On Mon, Sep 14, 2026 at 16:28:58 +0800, Zhenzhong Duan wrote:
When intel-iommu device is configured with First-Stage Translation Support ('fsts'), physical PCI device assignment requires the modern iommufd backend in QEMU, because the legacy container-based VFIO backend cannot support first-stage translation.
Introduce virDomainDefHasIntelIOMMUWithFSTS() in the domain configuration layer and export it to query whether a domain definition contains an intel-iommu with 'fsts' enabled.
In the QEMU driver validator, reject PCI hostdev assignments that do not use the 'iommufd' backend when 'fsts' is active on an intel-iommu device.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> --- src/conf/domain_conf.c | 25 +++++++++++++++++++++++++ src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 1 + src/qemu/qemu_validate.c | 4 ++++ 4 files changed, 33 insertions(+)
...
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 764d7c819e..fb4d100be3 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -2833,6 +2833,10 @@ qemuValidateDomainDeviceDefHostdev(const virDomainHostdevDef *hostdev, _("IOMMUFD is not supported by host kernel")); return -1; } + } else if (virDomainDefHasIntelIOMMUWithFSTS(def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("VFIO PCI device assignment without 'iommufd' is not compatible with 'intel' IOMMU with 'fsts'"));
This also ought to be documented with 'fsts' flag.
+ return -1; } }
-- 2.52.0
Reviewed-by: Peter Krempa <pkrempa@redhat.com>