Bug 696425

Summary: UV: The intel IOMMU code is using the incorrect dma_mask
Product: Red Hat Enterprise Linux 6 Reporter: George Beshers <gbeshers>
Component: kernelAssignee: George Beshers <gbeshers>
Status: CLOSED DUPLICATE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: high Docs Contact:
Priority: high    
Version: 6.2CC: bzeranski, dwa, gbeshers, martinez, rja, tee
Target Milestone: rc   
Target Release: 6.2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-11 15:42:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 652291, 688933    

Description George Beshers 2011-04-14 03:27:14 UTC
Description of problem:
dma_map_ops.alloc_coherent should be using the coherent_dma_mask, intel_alloc_coherent()
is not.  intel_alloc_coherent() calls __intel_map_single() passing in the correct mask,
hwdev->coherent_dma_mask, but then __intel_map_single() doesn't use it... it ends up 
using the pdev->dma_mask:


    static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr,
                                         size_t size, int dir, u64 dma_mask)
    {
    ...txt deleted...
            iova = intel_alloc_iova(hwdev, domain, dma_to_mm_pfn(size),
                                    pdev->dma_mask);
                                    ^^^^^^^^^^^^^^

I *think* this call to intel_alloc_iova() should be using the "dma_mask"
passed into it.  We should look into why the code is using pdev->dma_mask
rather than the hwdev->coherent_dma_mask on a dma_map_ops.alloc_coherent()
call other dma_map_ops alloc_coherent routines do.

...

Hopefully final version submitted:

http://marc.info/?l=linux-kernel&m=130220593715364&w=4

Subject: Intel pci: Use coherent DMA mask when requested

    The __intel_map_single function is not honoring the passed in
    DMA mask.  This results in not using the coherent DMA mask when
    called from intel_alloc_coherent().

Signed-off-by: Mike Travis <travis>
Reviewed-by: Mike Habeck <habeck>


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 RHEL Program Management 2011-04-14 06:02:26 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 George Beshers 2011-07-11 15:42:30 UTC

*** This bug has been marked as a duplicate of bug 696420 ***