[PATCH v6 22/22] docs/devel: Add IOMMUFD nesting documentation

Zhenzhong Duan posted 22 patches 1 month, 3 weeks ago
Maintainers: Yi Liu <yi.l.liu@intel.com>, Eric Auger <eric.auger@redhat.com>, Zhenzhong Duan <zhenzhong.duan@intel.com>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, "Clément Mathieu--Drif" <clement.mathieu--drif@eviden.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Alex Williamson <alex.williamson@redhat.com>, "Cédric Le Goater" <clg@redhat.com>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>
There is a newer version of this series
[PATCH v6 22/22] docs/devel: Add IOMMUFD nesting documentation
Posted by Zhenzhong Duan 1 month, 3 weeks ago
Add documentation about using IOMMUFD backed VFIO device with intel_iommu with
x-flts=on.

Suggested-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
---
 docs/devel/vfio-iommufd.rst | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/docs/devel/vfio-iommufd.rst b/docs/devel/vfio-iommufd.rst
index 3d1c11f175..d9cb9e7f5e 100644
--- a/docs/devel/vfio-iommufd.rst
+++ b/docs/devel/vfio-iommufd.rst
@@ -164,3 +164,27 @@ RAM discarding for mdev.
 
 ``vfio-ap`` and ``vfio-ccw`` devices don't have same issue as their backend
 devices are always mdev and RAM discarding is force enabled.
+
+Usage with intel_iommu with x-flts=on
+-------------------------------------
+
+Only IOMMUFD backed VFIO device is supported when intel_iommu is configured
+with x-flts=on, for legacy container backed VFIO device, below error shows:
+
+.. code-block:: none
+
+    qemu-system-x86_64: -device vfio-pci,host=0000:02:00.0: vfio 0000:02:00.0: Failed to set vIOMMU: Need IOMMUFD backend when x-flts=on
+
+VFIO device under PCI bridge is unsupported, use PCIE bridge if necessary,
+or else below error shows:
+
+.. code-block:: none
+
+    qemu-system-x86_64: -device vfio-pci,host=0000:02:00.0,bus=bridge1,iommufd=iommufd0: vfio 0000:02:00.0: Failed to set vIOMMU: Host device under PCI bridge is unsupported when x-flts=on
+
+If host IOMMU has ERRATA_772415_SPR17, kexec or reboot from "intel_iommu=on,sm_on"
+to "intel_iommu=on,sm_off" in guest is also unsupported. Configure scalable mode
+off as below if it's not needed by guest.
+
+.. code-block:: bash
+    -device intel-iommu,x-scalable-mode=off
-- 
2.47.1
Re: [PATCH v6 22/22] docs/devel: Add IOMMUFD nesting documentation
Posted by Cédric Le Goater 1 month, 3 weeks ago
Hello Zhenzhong

On 9/18/25 10:58, Zhenzhong Duan wrote:
> Add documentation about using IOMMUFD backed VFIO device with intel_iommu with
> x-flts=on.
> 
> Suggested-by: Yi Liu <yi.l.liu@intel.com>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
> ---
>   docs/devel/vfio-iommufd.rst | 24 ++++++++++++++++++++++++
>   1 file changed, 24 insertions(+)
> 
> diff --git a/docs/devel/vfio-iommufd.rst b/docs/devel/vfio-iommufd.rst
> index 3d1c11f175..d9cb9e7f5e 100644
> --- a/docs/devel/vfio-iommufd.rst
> +++ b/docs/devel/vfio-iommufd.rst
> @@ -164,3 +164,27 @@ RAM discarding for mdev.
>   
>   ``vfio-ap`` and ``vfio-ccw`` devices don't have same issue as their backend
>   devices are always mdev and RAM discarding is force enabled.
> +
> +Usage with intel_iommu with x-flts=on
> +-------------------------------------
> +
> +Only IOMMUFD backed VFIO device is supported when intel_iommu is configured
> +with x-flts=on, for legacy container backed VFIO device, below error shows:
> +
> +.. code-block:: none
> +
> +    qemu-system-x86_64: -device vfio-pci,host=0000:02:00.0: vfio 0000:02:00.0: Failed to set vIOMMU: Need IOMMUFD backend when x-flts=on
> +
> +VFIO device under PCI bridge is unsupported, use PCIE bridge if necessary,
> +or else below error shows:
> +
> +.. code-block:: none
> +
> +    qemu-system-x86_64: -device vfio-pci,host=0000:02:00.0,bus=bridge1,iommufd=iommufd0: vfio 0000:02:00.0: Failed to set vIOMMU: Host device under PCI bridge is unsupported when x-flts=on
> +
> +If host IOMMU has ERRATA_772415_SPR17, kexec or reboot from "intel_iommu=on,sm_on"
> +to "intel_iommu=on,sm_off" in guest is also unsupported. Configure scalable mode
> +off as below if it's not needed by guest.
> +
> +.. code-block:: bash

an new line lacks after code-block.


Thanks,

C.



> +    -device intel-iommu,x-scalable-mode=off
RE: [PATCH v6 22/22] docs/devel: Add IOMMUFD nesting documentation
Posted by Duan, Zhenzhong 1 month, 3 weeks ago
Hi Cédric,

>-----Original Message-----
>From: Cédric Le Goater <clg@redhat.com>
>Subject: Re: [PATCH v6 22/22] docs/devel: Add IOMMUFD nesting
>documentation
>
>Hello Zhenzhong
>
>On 9/18/25 10:58, Zhenzhong Duan wrote:
>> Add documentation about using IOMMUFD backed VFIO device with
>intel_iommu with
>> x-flts=on.
>>
>> Suggested-by: Yi Liu <yi.l.liu@intel.com>
>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
>> ---
>>   docs/devel/vfio-iommufd.rst | 24 ++++++++++++++++++++++++
>>   1 file changed, 24 insertions(+)
>>
>> diff --git a/docs/devel/vfio-iommufd.rst b/docs/devel/vfio-iommufd.rst
>> index 3d1c11f175..d9cb9e7f5e 100644
>> --- a/docs/devel/vfio-iommufd.rst
>> +++ b/docs/devel/vfio-iommufd.rst
>> @@ -164,3 +164,27 @@ RAM discarding for mdev.
>>
>>   ``vfio-ap`` and ``vfio-ccw`` devices don't have same issue as their
>backend
>>   devices are always mdev and RAM discarding is force enabled.
>> +
>> +Usage with intel_iommu with x-flts=on
>> +-------------------------------------
>> +
>> +Only IOMMUFD backed VFIO device is supported when intel_iommu is
>configured
>> +with x-flts=on, for legacy container backed VFIO device, below error
>shows:
>> +
>> +.. code-block:: none
>> +
>> +    qemu-system-x86_64: -device vfio-pci,host=0000:02:00.0: vfio
>0000:02:00.0: Failed to set vIOMMU: Need IOMMUFD backend when
>x-flts=on
>> +
>> +VFIO device under PCI bridge is unsupported, use PCIE bridge if necessary,
>> +or else below error shows:
>> +
>> +.. code-block:: none
>> +
>> +    qemu-system-x86_64: -device
>vfio-pci,host=0000:02:00.0,bus=bridge1,iommufd=iommufd0: vfio
>0000:02:00.0: Failed to set vIOMMU: Host device under PCI bridge is
>unsupported when x-flts=on
>> +
>> +If host IOMMU has ERRATA_772415_SPR17, kexec or reboot from
>"intel_iommu=on,sm_on"
>> +to "intel_iommu=on,sm_off" in guest is also unsupported. Configure
>scalable mode
>> +off as below if it's not needed by guest.
>> +
>> +.. code-block:: bash
>
>an new line lacks after code-block.

Thanks for pointing out, will fix, I forgot to make docs once again☹

BRs,
Zhenzhong