On Thu, Mar 19, 2026 at 17:36:53 +0100, Pavel Hrdina via Devel wrote:
> From: Pavel Hrdina <[email protected]>
> 
> In addition to configuring IOMMUFD for each host device add
> configuration for the whole VM. This will be extended to add support for
> passing FD to libvirt from management applications.
> 
> Signed-off-by: Pavel Hrdina <[email protected]>
> ---
>  docs/formatdomain.rst                  | 21 ++++++++++++
>  src/conf/domain_conf.c                 | 46 ++++++++++++++++++++++++++
>  src/conf/domain_conf.h                 |  2 ++
>  src/conf/schemas/domaincommon.rng      | 12 +++++++
>  tests/genericxml2xmlindata/iommufd.xml | 18 ++++++++++
>  tests/genericxml2xmltest.c             |  2 ++
>  6 files changed, 101 insertions(+)
>  create mode 100644 tests/genericxml2xmlindata/iommufd.xml
> 
> diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
> index 9f245293e6..f6096b2b9b 100644
> --- a/docs/formatdomain.rst
> +++ b/docs/formatdomain.rst
> @@ -1382,6 +1382,27 @@ Block I/O Tuning
>     ``write_iops_sec``
>        Write I/O operations per second limit. :since:`Since 1.2.2`
>  
> +Host Device IOMMUFD
> +-------------------
> +
> +::
> +
> +   <domain>
> +     ...
> +     <iommufd enabled='yes'/>
> +     ...
> +   </domain>
> +
> +``iommufd``
> +   :since:`Since 12.2.0 (QEMU/KVM only)` The optional ``iommufd`` element 
> with
> +   mandatory ``enabled`` attribute can be used to enable IOMMUFD backned for

backend

> +   VFIO host devices. This provides an 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.
> +
> +   This controls IOMMUFD usage for all host devices, each device can change 
> this
> +   global default by setting ``iommufd`` attribute for ``driver`` element.
> +
>  Resource partitioning
>  ---------------------

Reviewed-by: Peter Krempa <[email protected]>

Reply via email to