[lkml]   [2011]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH v4 2/7] iommu/core: split mapping to page sizes as supported by the hardware
    On Thu, Nov 10, 2011 at 10:35:34PM +0800, cody wrote:
    > Yes I totally agree page-size is not required for unmap operations
    > and should not be added as parameter to map/unmap operations. I am
    > not saying the unmap operation, but the IOTLB flush operation. My
    > point is we also may also need to add similar logic in IOTLB flush
    > code (such as in Intel IOMMU dirver) to grantee that when issuing
    > IOTLB flush command for large page, we will still meet the hardware
    > limitation of flushing large page. Seems for Intel IOMMU the only
    > limitation is the mask value (indicating number of 4k-pages) cannot
    > be smaller than the value to cover large page, and seems current
    > Intel IOMMU driver code has covered this case well. I am not
    > familiar with how AMD IOMMU issues IOTLB flush command, it should be
    > able to handle this large page case too. So at this moment, this
    > patch should not have any issues :)

    The map-operation actually takes a size, as it should. The idea is to
    change this function to a map_page interface which takes a page-size
    parameter, but thats another story.
    The IOTLB flushing is not exposed by the IOMMU-API anyway. To whatever
    is necessary to do that, it is the business of the IOMMU driver. So in
    the unmap-path the driver finds out the page-size to unmap and can
    immediatly flush the IOTLB for that page.


    AMD Operating System Research Center

    Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
    General Managers: Alberto Bozzo, Andrew Bowd
    Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

     \ /
      Last update: 2011-11-10 15:53    [W:0.025 / U:5.476 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site