On a Wednesday in 2025, Nathan Chen via Devel wrote:
Add support for parsing multiple IOMMU devices from
the VM definition when "smmuv3" is the IOMMU model.

Signed-off-by: Nathan Chen <[email protected]>
---
src/conf/domain_conf.c            |  84 +++++++++++++++-----
src/conf/domain_conf.h            |   9 ++-
src/conf/domain_validate.c        |  33 +++++---
src/conf/schemas/domaincommon.rng |   4 +-
src/libvirt_private.syms          |   2 +
src/qemu/qemu_alias.c             |  15 ++--
src/qemu/qemu_command.c           | 128 +++++++++++++++---------------
src/qemu/qemu_domain.c            |   2 +-
src/qemu/qemu_domain_address.c    |   5 +-
src/qemu/qemu_driver.c            |   8 +-
src/qemu/qemu_postparse.c         |   9 ++-
src/qemu/qemu_validate.c          |   2 +-
12 files changed, 182 insertions(+), 119 deletions(-)


Reviewed-by: Ján Tomko <[email protected]>

I will squash this in before pushing to remove the memleak later patches
would introduce:

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index aa5cbb9a85..b776a41720 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6245,11 +6245,12 @@ qemuBuildIOMMUCommandLine(virCommand *cmd,
                           virQEMUCaps *qemuCaps)
 {
     size_t i;
-    g_autoptr(virJSONValue) props = NULL;
-    g_autoptr(virJSONValue) wrapperProps = NULL;

     for (i = 0; i < def->niommus; i++) {
         virDomainIOMMUDef *iommu = def->iommus[i];
+        g_autoptr(virJSONValue) props = NULL;
+        g_autoptr(virJSONValue) wrapperProps = NULL;
+
         switch (iommu->model) {
         case VIR_DOMAIN_IOMMU_MODEL_INTEL:
             if (virJSONValueObjectAdd(&props,

Jano

Attachment: signature.asc
Description: PGP signature

Reply via email to