Skip to content

Commit 2ec0458

Browse files
nicolincjgunthorpe
authored andcommitted
Documentation: userspace-api: iommufd: Update FAULT and VEVENTQ
With the introduction of the new objects, update the doc to reflect that. Link: https://patch.msgid.link/r/09829fbc218872d242323d8834da4bec187ce6f4.1741719725.git.nicolinc@nvidia.com Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 97717a1 commit 2ec0458

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Documentation/userspace-api/iommufd.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ Following IOMMUFD objects are exposed to userspace:
6363
space usually has mappings from guest-level I/O virtual addresses to guest-
6464
level physical addresses.
6565

66+
- IOMMUFD_FAULT, representing a software queue for an HWPT reporting IO page
67+
faults using the IOMMU HW's PRI (Page Request Interface). This queue object
68+
provides user space an FD to poll the page fault events and also to respond
69+
to those events. A FAULT object must be created first to get a fault_id that
70+
could be then used to allocate a fault-enabled HWPT via the IOMMU_HWPT_ALLOC
71+
command by setting the IOMMU_HWPT_FAULT_ID_VALID bit in its flags field.
72+
6673
- IOMMUFD_OBJ_VIOMMU, representing a slice of the physical IOMMU instance,
6774
passed to or shared with a VM. It may be some HW-accelerated virtualization
6875
features and some SW resources used by the VM. For examples:
@@ -109,6 +116,14 @@ Following IOMMUFD objects are exposed to userspace:
109116
vIOMMU, which is a separate ioctl call from attaching the same device to an
110117
HWPT_PAGING that the vIOMMU holds.
111118

119+
- IOMMUFD_OBJ_VEVENTQ, representing a software queue for a vIOMMU to report its
120+
events such as translation faults occurred to a nested stage-1 (excluding I/O
121+
page faults that should go through IOMMUFD_OBJ_FAULT) and HW-specific events.
122+
This queue object provides user space an FD to poll/read the vIOMMU events. A
123+
vIOMMU object must be created first to get its viommu_id, which could be then
124+
used to allocate a vEVENTQ. Each vIOMMU can support multiple types of vEVENTS,
125+
but is confined to one vEVENTQ per vEVENTQ type.
126+
112127
All user-visible objects are destroyed via the IOMMU_DESTROY uAPI.
113128

114129
The diagrams below show relationships between user-visible objects and kernel
@@ -251,8 +266,10 @@ User visible objects are backed by following datastructures:
251266
- iommufd_device for IOMMUFD_OBJ_DEVICE.
252267
- iommufd_hwpt_paging for IOMMUFD_OBJ_HWPT_PAGING.
253268
- iommufd_hwpt_nested for IOMMUFD_OBJ_HWPT_NESTED.
269+
- iommufd_fault for IOMMUFD_OBJ_FAULT.
254270
- iommufd_viommu for IOMMUFD_OBJ_VIOMMU.
255271
- iommufd_vdevice for IOMMUFD_OBJ_VDEVICE.
272+
- iommufd_veventq for IOMMUFD_OBJ_VEVENTQ.
256273

257274
Several terminologies when looking at these datastructures:
258275

0 commit comments

Comments
 (0)