• J
    iommu: Introduce Shared Virtual Addressing API · 798b045d
    Jean-Philippe Brucker 提交于
    hulk inclusion
    category: feature
    bugzilla: 14369
    CVE: NA
    -------------------
    
    Shared Virtual Addressing (SVA) provides a way for device drivers to bind
    process address spaces to devices. This requires the IOMMU to support page
    table format and features compatible with the CPUs, and usually requires
    the system to support I/O Page Faults (IOPF) and Process Address Space ID
    (PASID). When all of these are available, DMA can access virtual addresses
    of a process. A PASID is allocated for each process, and the device driver
    programs it into the device in an implementation-specific way.
    
    Add a new API for sharing process page tables with devices. Introduce two
    IOMMU operations, sva_device_init() and sva_device_shutdown(), that
    prepare the IOMMU driver for SVA. For example allocate PASID tables and
    fault queues. Subsequent patches will implement the bind() and unbind()
    operations.
    
    Support for I/O Page Faults will be added in a later patch using a new
    feature bit (IOMMU_SVA_FEAT_IOPF). With the current API users must pin
    down all shared mappings. Other feature bits that may be added in the
    future are IOMMU_SVA_FEAT_PRIVATE, to support private PASID address
    spaces, and IOMMU_SVA_FEAT_NO_PASID, to bind the whole device address
    space to a process.
    Signed-off-by: NJean-Philippe Brucker <jean-philippe.brucker@arm.com>
    Signed-off-by: NFang Lijun <fanglijun3@huawei.com>
    Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
    Reviewed-by: NZhen Lei <thunder.leizhen@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    798b045d
iommu-sva.c 2.8 KB