On Fri, Jan 16, 2026 at 05:39:31PM -0800, Nathan Chen via Devel wrote: > From: Nathan Chen <[email protected]> > > Implement a new iommufd attribute under hostdevs' PCI > subsystem driver that can be used to specify associated > iommufd object when launching a qemu VM. > > Signed-off-by: Ján Tomko <[email protected]> > Signed-off-by: Nathan Chen <[email protected]> > --- > docs/formatdomain.rst | 7 +++++ > src/conf/device_conf.c | 11 ++++++++ > src/conf/device_conf.h | 1 + > src/conf/schemas/basictypes.rng | 5 ++++ > src/qemu/qemu_command.c | 46 +++++++++++++++++++++++++++++++++ > 5 files changed, 70 insertions(+) > > diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst > index 04ef319a73..08fc3f3944 100644 > --- a/docs/formatdomain.rst > +++ b/docs/formatdomain.rst > @@ -4920,6 +4920,13 @@ or: > found is "problematic" in some way, the generic vfio-pci driver > similarly be forced.
We should add :since:`Since 12.1.0 (QEMU and KVM only)` > + The ``<driver>`` element's ``iommufd`` attribute is used to specify > + using the iommufd interface to propagate DMA mappings to the kernel, > + instead of VFIO alone. When the attribute is present, an iommufd > + object will be created by the resulting qemu command. Libvirt will > + open the /dev/iommu and VFIO device cdev, passing the associated > + file descriptor numbers to the qemu command. I would rephrase this paragraph to something like this: :since:`Since 12.1.0 (QEMU and KVM only), the ``iommufd`` element can be used to enable IOMMUFD backend for VFIO device. This provides interface to propagate DMA mappings to kernel for assigned devices. Libvirt will open the /dev/iommu and VFIO device cdev and pass associated file descriptors to QEMU. Pavel
signature.asc
Description: PGP signature
