Skip to content

Commit 035c921

Browse files
nicolincjgunthorpe
authored andcommitted
Documentation: userspace-api: iommufd: Update HW QUEUE
With the introduction of the new object and its infrastructure, update the doc to reflect that. Link: https://patch.msgid.link/r/caa3ddc0d9bacf05c5b3e02c5f306ff3172cc54d.1752126748.git.nicolinc@nvidia.com Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 80478a2 commit 035c921

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Documentation/userspace-api/iommufd.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,17 @@ Following IOMMUFD objects are exposed to userspace:
124124
used to allocate a vEVENTQ. Each vIOMMU can support multiple types of vEVENTS,
125125
but is confined to one vEVENTQ per vEVENTQ type.
126126

127+
- IOMMUFD_OBJ_HW_QUEUE, representing a hardware accelerated queue, as a subset
128+
of IOMMU's virtualization features, for the IOMMU HW to directly read or write
129+
the virtual queue memory owned by a guest OS. This HW-acceleration feature can
130+
allow VM to work with the IOMMU HW directly without a VM Exit, so as to reduce
131+
overhead from the hypercalls. Along with the HW QUEUE object, iommufd provides
132+
user space an mmap interface for VMM to mmap a physical MMIO region from the
133+
host physical address space to the guest physical address space, allowing the
134+
guest OS to directly control the allocated HW QUEUE. Thus, when allocating a
135+
HW QUEUE, the VMM must request a pair of mmap info (offset/length) and pass in
136+
exactly to an mmap syscall via its offset and length arguments.
137+
127138
All user-visible objects are destroyed via the IOMMU_DESTROY uAPI.
128139

129140
The diagrams below show relationships between user-visible objects and kernel
@@ -270,6 +281,7 @@ User visible objects are backed by following datastructures:
270281
- iommufd_viommu for IOMMUFD_OBJ_VIOMMU.
271282
- iommufd_vdevice for IOMMUFD_OBJ_VDEVICE.
272283
- iommufd_veventq for IOMMUFD_OBJ_VEVENTQ.
284+
- iommufd_hw_queue for IOMMUFD_OBJ_HW_QUEUE.
273285

274286
Several terminologies when looking at these datastructures:
275287

0 commit comments

Comments
 (0)