libvirt/libvirt-conf-Introduce-iommufd-enum-for-domaincaps.patch
Jiri Denemark 420786d401 libvirt-11.10.0-10.el9
- qemu: Introduce QEMU_CAPS_OBJECT_IOMMUFD (RHEL-150353)
- qemu: Move IOMMUFD validation to qemu_validate (RHEL-150353)
- util: Move openning IOMMU device to viriommufd (RHEL-150353)
- qemu_process: Refactor qemuProcessOpenIommuFd (RHEL-150353)
- util: Move openning VFIO device to virpci (RHEL-150353)
- qemu_process: Refactor qemuProcessOpenVfioDeviceFd (RHEL-150353)
- util: Use virPCIDevice as argument in virPCIDeviceGetVfioPath (RHEL-150353)
- conf: Introduce virHostdevIsPCIDeviceWithIOMMUFD (RHEL-150353)
- conf: Introduce virDomainDefHasPCIHostdevWithIOMMUFD (RHEL-150353)
- qemu_domain: Add missing IOMMUFD cleanup (RHEL-150353)
- qemu_process: Fix FD leak with multiple host devices using IOMMUFD (RHEL-150353)
- qemu_process: Refactor qemuProcessOpenVfioFds (RHEL-150353)
- qemuxmlconftest: Refactor host device preparation (RHEL-150353)
- qemuxmlconftest: Rename and refactor testSetupHostdevPrivateData (RHEL-150353)
- qemuxmlconftest: Set fake FD for IOMMUFD (RHEL-150353)
- qemu: Convert IOMMUFD to qemuFDPassDirect (RHEL-150353)
- qemu: Convert vfioDeviceFd to qemuFDPassDirect (RHEL-150353)
- qemu_command: Don't use host property if IOMMUFD is used (RHEL-150353)
- qemu: Save IOMMUFD state into status XML (RHEL-150353)
- qemu_hotplug: Remove iommufd object if no longer needed (RHEL-150353)
- qemu_command: Extract building IOMMUFD props to function (RHEL-150353)
- qemu_hotplug: Add support to hotplug host device with IOMMUFD (RHEL-150353)
- conf: Introduce iommufd enum for domaincaps (RHEL-138544)
- qemu: Fill iommufd domain capability (RHEL-138544)
- tests: properly mock VFIO and IOMMU checks (RHEL-138544)
- iommufd: fix FD leak in case of error (RHEL-150353)

Resolves: RHEL-138544, RHEL-150353
2026-02-18 15:10:32 +01:00

70 lines
2.7 KiB
Diff

From 18aa061f3b4f2b2c2ed6f07120a990935f56d93e Mon Sep 17 00:00:00 2001
Message-ID: <18aa061f3b4f2b2c2ed6f07120a990935f56d93e.1771423832.git.jdenemar@redhat.com>
From: Pavel Hrdina <phrdina@redhat.com>
Date: Sat, 14 Feb 2026 06:14:20 +0100
Subject: [PATCH] conf: Introduce iommufd enum for domaincaps
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 855f8fe9e2454555ba84696750e0e1501dd5ba80)
Resolves: https://issues.redhat.com/browse/RHEL-138544
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
docs/formatdomaincaps.rst | 7 +++++++
src/conf/domain_capabilities.c | 1 +
src/conf/domain_capabilities.h | 1 +
3 files changed, 9 insertions(+)
diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst
index 8b4f0ecff3..6ba7f84f96 100644
--- a/docs/formatdomaincaps.rst
+++ b/docs/formatdomaincaps.rst
@@ -461,6 +461,10 @@ Well, only if the following is enabled:
<value>vfio</value>
<value>xen</value>
</enum>
+ <enum name='iommufd'>
+ <value>yes</value>
+ <value>no</value>
+ </enum>
</hostdev>
</devices>
</domainCapabilities>
@@ -477,6 +481,9 @@ Well, only if the following is enabled:
``mode="capabilities"``.
``pciBackend``
Options for the ``name`` attribute of the <driver/> element.
+``iommufd``
+ Options for the ``iommufd`` attribute of the <driver/> element.
+ :since:`Since 12.1.0`
RNG device
^^^^^^^^^^
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index f843124695..49179b97ab 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -620,6 +620,7 @@ virDomainCapsDeviceHostdevFormat(virBuffer *buf,
ENUM_PROCESS(hostdev, subsysType, virDomainHostdevSubsysTypeToString);
ENUM_PROCESS(hostdev, capsType, virDomainHostdevCapsTypeToString);
ENUM_PROCESS(hostdev, pciBackend, virDeviceHostdevPCIDriverNameTypeToString);
+ ENUM_PROCESS(hostdev, iommufd, virTristateBoolTypeToString);
FORMAT_EPILOGUE(hostdev);
}
diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h
index 437981c711..b10370db8f 100644
--- a/src/conf/domain_capabilities.h
+++ b/src/conf/domain_capabilities.h
@@ -108,6 +108,7 @@ struct _virDomainCapsDeviceHostdev {
virDomainCapsEnum subsysType; /* Info about virDomainHostdevSubsysType */
virDomainCapsEnum capsType; /* Info about virDomainHostdevCapsType */
virDomainCapsEnum pciBackend; /* Info about virDomainHostdevSubsysPCIBackendType */
+ virDomainCapsEnum iommufd; /* Info about iommufd:virTristateBool */
/* add new fields here */
};
--
2.53.0