diff options
author | Lu Baolu <[email protected]> | 2024-07-02 14:34:41 +0800 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2024-07-09 13:54:32 -0300 |
commit | b7d8833677baad8c80ed1aac8c396d687e64a376 (patch) | |
tree | 211a8df4c1bd11ed6062a2dc7e42bb321f761729 /lib/memory-notifier-error-inject.c | |
parent | 07838f7fd529c8a6de44b601d4b7057e6c8d36ed (diff) |
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/[email protected]
Signed-off-by: Lu Baolu <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions