diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2024-07-02 14:34:41 +0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2024-07-09 13:54:32 -0300 |
commit | b7d8833677baad8c80ed1aac8c396d687e64a376 (patch) | |
tree | 211a8df4c1bd11ed6062a2dc7e42bb321f761729 /include/uapi | |
parent | 07838f7fd529c8a6de44b601d4b7057e6c8d36ed (diff) | |
download | lwn-b7d8833677baad8c80ed1aac8c396d687e64a376.tar.gz lwn-b7d8833677baad8c80ed1aac8c396d687e64a376.zip |
iommufd: Fault-capable hwpt attach/detach/replace
Add iopf-capable hw page table attach/detach/replace helpers. The pointer
to iommufd_device is stored in the domain attachment handle, so that it
can be echo'ed back in the iopf_group.
The iopf-capable hw page tables can only be attached to devices that
support the IOMMU_DEV_FEAT_IOPF feature. On the first attachment of an
iopf-capable hw_pagetable to the device, the IOPF feature is enabled on
the device. Similarly, after the last iopf-capable hwpt is detached from
the device, the IOPF feature is disabled on the device.
The current implementation allows a replacement between iopf-capable and
non-iopf-capable hw page tables. This matches the nested translation use
case, where a parent domain is attached by default and can then be
replaced with a nested user domain with iopf support.
Link: https://lore.kernel.org/r/20240702063444.105814-8-baolu.lu@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions