lkml.org 
[lkml]   [2020]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Subject[PATCH v3 0/5] IOMMU user API enhancement
    Date
    IOMMU user API header was introduced to support nested DMA translation and
    related fault handling. The current UAPI data structures consist of three
    areas that cover the interactions between host kernel and guest:
    - fault handling
    - cache invalidation
    - bind guest page tables, i.e. guest PASID

    Future extensions are likely to support more architectures and vIOMMU features.

    In the previous discussion, using user-filled data size and feature flags is
    made a preferred approach over a unified version number.
    https://lkml.org/lkml/2020/1/29/45

    In addition to introduce argsz field to data structures, this patchset is also
    trying to document the UAPI design, usage, and extension rules. VT-d driver
    changes to utilize the new argsz field is included, VFIO usage is to follow.

    Thanks,

    Jacob


    Changeog:
    v3:
    - Rewrote backward compatibility rule to support existing code
    re-compiled with newer kernel UAPI header that runs on older
    kernel. Based on review comment from Alex W.
    https://lore.kernel.org/linux-iommu/20200611094741.6d118fa8@w520.home/
    - Take user pointer directly in UAPI functions. Perform argsz check
    and copy_from_user() in IOMMU driver. Eliminate the need for
    VFIO or other upper layer to parse IOMMU data.
    - Create wrapper function for in-kernel users of UAPI functions
    v2:
    - Removed unified API version and helper
    - Introduced argsz for each UAPI data
    - Introduced UAPI doc

    Jacob Pan (5):
    docs: IOMMU user API
    iommu/uapi: Add argsz for user filled data
    iommu/uapi: Use named union for user data
    iommu/uapi: Handle data and argsz filled by users
    iommu/uapi: Support both kernel and user unbind guest PASID

    Documentation/userspace-api/iommu.rst | 244 ++++++++++++++++++++++++++++++++++
    drivers/iommu/intel/iommu.c | 24 ++--
    drivers/iommu/intel/svm.c | 5 +-
    drivers/iommu/iommu.c | 138 +++++++++++++++++--
    include/linux/iommu.h | 20 ++-
    include/uapi/linux/iommu.h | 10 +-
    6 files changed, 413 insertions(+), 28 deletions(-)
    create mode 100644 Documentation/userspace-api/iommu.rst

    --
    2.7.4

    \
     
     \ /
      Last update: 2020-06-23 18:57    [W:4.183 / U:0.240 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site