render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
3e5111
From be9562bdb0bef5b3e8db7dd22104631f13188f3a Mon Sep 17 00:00:00 2001
3e5111
Message-Id: <be9562bdb0bef5b3e8db7dd22104631f13188f3a@dist-git>
3e5111
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
3e5111
Date: Tue, 16 May 2017 10:44:53 +0200
3e5111
Subject: [PATCH] qemu: format kernel_irqchip on the command line
3e5111
MIME-Version: 1.0
3e5111
Content-Type: text/plain; charset=UTF-8
3e5111
Content-Transfer-Encoding: 8bit
3e5111
3e5111
Add kernel_irqchip=split/on to the QEMU command line
3e5111
and a capability that looks for it in query-command-line-options
3e5111
output. For the 'split' option, use a version check
3e5111
since it cannot be reasonably probed.
3e5111
3e5111
https://bugzilla.redhat.com/show_bug.cgi?id=1427005
3e5111
(cherry picked from commit 6b5c6314b2f7a3b54c94a591e6b0dcd13ef1c6ce)
3e5111
Signed-off-by: Ján Tomko <jtomko@redhat.com>
3e5111
3e5111
Conflicts:
3e5111
        tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
3e5111
          - downstream did not update the qemu version to 2.9.0
3e5111
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
---
3e5111
 src/qemu/qemu_capabilities.c                       |  8 +++++++
3e5111
 src/qemu/qemu_capabilities.h                       |  4 ++++
3e5111
 src/qemu/qemu_command.c                            | 25 ++++++++++++++++++++++
3e5111
 src/qemu/qemu_domain.c                             | 19 ++++++++++++++++
3e5111
 tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml   |  1 +
3e5111
 tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml   |  1 +
3e5111
 tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml   |  1 +
3e5111
 tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml   |  1 +
3e5111
 tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml   |  1 +
3e5111
 tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml   |  1 +
3e5111
 .../caps_2.6.0-gicv2.aarch64.xml                   |  2 ++
3e5111
 .../caps_2.6.0-gicv3.aarch64.xml                   |  2 ++
3e5111
 tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml  |  2 ++
3e5111
 tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml   |  2 ++
3e5111
 tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml    |  2 ++
3e5111
 tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml   |  2 ++
3e5111
 tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml    |  2 ++
3e5111
 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml   |  2 ++
3e5111
 tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml   |  2 ++
3e5111
 .../qemuxml2argv-intel-iommu-ioapic.args           | 19 ++++++++++++++++
3e5111
 tests/qemuxml2argvtest.c                           |  5 +++++
3e5111
 21 files changed, 104 insertions(+)
3e5111
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
3e5111
3e5111
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
3e5111
index 49fb52e03..f27fe0a24 100644
3e5111
--- a/src/qemu/qemu_capabilities.c
3e5111
+++ b/src/qemu/qemu_capabilities.c
3e5111
@@ -366,6 +366,9 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
3e5111
               "query-named-block-nodes",
3e5111
               "cpu-cache",
3e5111
               "qemu-xhci",
3e5111
+
3e5111
+              "kernel-irqchip", /* 255 */
3e5111
+              "kernel-irqchip.split",
3e5111
     );
3e5111
 
3e5111
 
3e5111
@@ -3128,6 +3131,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = {
3e5111
     { "drive", "throttling.bps-total-max-length", QEMU_CAPS_DRIVE_IOTUNE_MAX_LENGTH },
3e5111
     { "drive", "throttling.group", QEMU_CAPS_DRIVE_IOTUNE_GROUP },
3e5111
     { "spice", "rendernode", QEMU_CAPS_SPICE_RENDERNODE },
3e5111
+    { "machine", "kernel_irqchip", QEMU_CAPS_MACHINE_KERNEL_IRQCHIP },
3e5111
 };
3e5111
 
3e5111
 static int
3e5111
@@ -4743,6 +4747,10 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
3e5111
     if (qemuCaps->version >= 2004050)
3e5111
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACH_VIRT_GIC_VERSION);
3e5111
 
3e5111
+    /* no way to query if -machine kernel_irqchip supports split */
3e5111
+    if (qemuCaps->version >= 2006000)
3e5111
+        virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT);
3e5111
+
3e5111
     if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
3e5111
         goto cleanup;
3e5111
 
3e5111
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
3e5111
index 1cd3ec37d..a6cdf2c3d 100644
3e5111
--- a/src/qemu/qemu_capabilities.h
3e5111
+++ b/src/qemu/qemu_capabilities.h
3e5111
@@ -404,6 +404,10 @@ typedef enum {
3e5111
     QEMU_CAPS_CPU_CACHE, /* -cpu supports host-cache-info and l3-cache properties */
3e5111
     QEMU_CAPS_DEVICE_QEMU_XHCI, /* -device qemu-xhci */
3e5111
 
3e5111
+    /* 255 */
3e5111
+    QEMU_CAPS_MACHINE_KERNEL_IRQCHIP, /* -machine kernel_irqchip */
3e5111
+    QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT, /* -machine kernel_irqchip=split */
3e5111
+
3e5111
     QEMU_CAPS_LAST /* this must always be the last item */
3e5111
 } virQEMUCapsFlags;
3e5111
 
3e5111
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
3e5111
index b27b9f8ad..7151b1843 100644
3e5111
--- a/src/qemu/qemu_command.c
3e5111
+++ b/src/qemu/qemu_command.c
3e5111
@@ -7429,6 +7429,31 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
3e5111
             }
3e5111
         }
3e5111
 
3e5111
+        if (def->features[VIR_DOMAIN_FEATURE_IOAPIC] == VIR_TRISTATE_SWITCH_ON) {
3e5111
+            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP)) {
3e5111
+                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
3e5111
+                               _("I/O APIC tuning is not supported by this "
3e5111
+                                 "QEMU binary"));
3e5111
+                goto cleanup;
3e5111
+            }
3e5111
+            switch (def->ioapic) {
3e5111
+            case VIR_DOMAIN_IOAPIC_QEMU:
3e5111
+                if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT)) {
3e5111
+                    virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
3e5111
+                                   _("split I/O APIC is not supported by this "
3e5111
+                                     "QEMU binary"));
3e5111
+                    goto cleanup;
3e5111
+                }
3e5111
+                virBufferAddLit(&buf, ",kernel_irqchip=split");
3e5111
+                break;
3e5111
+            case VIR_DOMAIN_IOAPIC_KVM:
3e5111
+                virBufferAddLit(&buf, ",kernel_irqchip=on");
3e5111
+                break;
3e5111
+            case VIR_DOMAIN_IOAPIC_LAST:
3e5111
+                break;
3e5111
+            }
3e5111
+        }
3e5111
+
3e5111
         virCommandAddArgBuffer(cmd, &buf;;
3e5111
     }
3e5111
 
3e5111
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
3e5111
index 04d1b39db..a8a68aedd 100644
3e5111
--- a/src/qemu/qemu_domain.c
3e5111
+++ b/src/qemu/qemu_domain.c
3e5111
@@ -2776,6 +2776,22 @@ qemuDomainDefCPUPostParse(virDomainDefPtr def)
3e5111
 
3e5111
 
3e5111
 static int
3e5111
+qemuDomainDefVerifyFeatures(const virDomainDef *def)
3e5111
+{
3e5111
+    if (def->features[VIR_DOMAIN_FEATURE_IOAPIC] == VIR_TRISTATE_SWITCH_ON &&
3e5111
+        !ARCH_IS_X86(def->os.arch)) {
3e5111
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
3e5111
+                       _("I/O APIC tuning is not supported "
3e5111
+                         "for '%s' architecture"),
3e5111
+                       virArchToString(def->os.arch));
3e5111
+        return -1;
3e5111
+    }
3e5111
+
3e5111
+    return 0;
3e5111
+}
3e5111
+
3e5111
+
3e5111
+static int
3e5111
 qemuDomainDefPostParse(virDomainDefPtr def,
3e5111
                        virCapsPtr caps,
3e5111
                        unsigned int parseFlags,
3e5111
@@ -2830,6 +2846,9 @@ qemuDomainDefPostParse(virDomainDefPtr def,
3e5111
 
3e5111
     qemuDomainDefEnableDefaultFeatures(def, qemuCaps);
3e5111
 
3e5111
+    if (qemuDomainDefVerifyFeatures(def) < 0)
3e5111
+        goto cleanup;
3e5111
+
3e5111
     if (qemuDomainRecheckInternalPaths(def, cfg, parseFlags) < 0)
3e5111
         goto cleanup;
3e5111
 
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
3e5111
index a68c13bbd..14f34b277 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
3e5111
@@ -140,6 +140,7 @@
3e5111
   <flag name='display'/>
3e5111
   <flag name='vhost-scsi'/>
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
   <version>1005003</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package></package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
3e5111
index 365b3a650..8fc23d6aa 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
3e5111
@@ -145,6 +145,7 @@
3e5111
   <flag name='display'/>
3e5111
   <flag name='vhost-scsi'/>
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
   <version>1006000</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package></package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
3e5111
index 689fbf82c..47c8956b4 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
3e5111
@@ -147,6 +147,7 @@
3e5111
   <flag name='display'/>
3e5111
   <flag name='vhost-scsi'/>
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
   <version>1007000</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package></package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
3e5111
index e092dd254..afe7d53ff 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
3e5111
@@ -163,6 +163,7 @@
3e5111
   <flag name='vhost-scsi'/>
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
   <flag name='query-named-block-nodes'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
   <version>2001001</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package></package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
3e5111
index ea03f2e66..5bdc1a2bd 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
3e5111
@@ -185,6 +185,7 @@
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
   <flag name='block-write-threshold'/>
3e5111
   <flag name='query-named-block-nodes'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
   <version>2004000</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package></package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
3e5111
index 164605f20..36bc1342b 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
3e5111
@@ -191,6 +191,7 @@
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
   <flag name='block-write-threshold'/>
3e5111
   <flag name='query-named-block-nodes'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
   <version>2005000</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package></package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
3e5111
index af3a8e7cb..33bc46208 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
3e5111
@@ -168,6 +168,8 @@
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
   <flag name='block-write-threshold'/>
3e5111
   <flag name='query-named-block-nodes'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
+  <flag name='kernel-irqchip.split'/>
3e5111
   <version>2006000</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package></package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
3e5111
index 4402ffa6f..a8ce6b03b 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
3e5111
@@ -168,6 +168,8 @@
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
   <flag name='block-write-threshold'/>
3e5111
   <flag name='query-named-block-nodes'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
+  <flag name='kernel-irqchip.split'/>
3e5111
   <version>2006000</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package></package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
3e5111
index 3f05169c8..425992f0d 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
3e5111
@@ -162,6 +162,8 @@
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
   <flag name='block-write-threshold'/>
3e5111
   <flag name='query-named-block-nodes'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
+  <flag name='kernel-irqchip.split'/>
3e5111
   <version>2006000</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package></package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
3e5111
index 1d823eac2..97e71ec4f 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
3e5111
@@ -200,6 +200,8 @@
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
   <flag name='block-write-threshold'/>
3e5111
   <flag name='query-named-block-nodes'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
+  <flag name='kernel-irqchip.split'/>
3e5111
   <version>2006000</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package></package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
3e5111
index 38d36b3e6..70cce6417 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
3e5111
@@ -130,6 +130,8 @@
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
   <flag name='block-write-threshold'/>
3e5111
   <flag name='query-named-block-nodes'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
+  <flag name='kernel-irqchip.split'/>
3e5111
   <version>2007000</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package></package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
3e5111
index 24d7cb438..6c2ea59c6 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
3e5111
@@ -202,6 +202,8 @@
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
   <flag name='block-write-threshold'/>
3e5111
   <flag name='query-named-block-nodes'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
+  <flag name='kernel-irqchip.split'/>
3e5111
   <version>2007000</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package> (v2.7.0)</package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
3e5111
index 42c92c567..51be9bce4 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
3e5111
@@ -132,6 +132,8 @@
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
   <flag name='block-write-threshold'/>
3e5111
   <flag name='query-named-block-nodes'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
+  <flag name='kernel-irqchip.split'/>
3e5111
   <version>2007093</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package></package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
3e5111
index 0bc13683e..9c8c79ab0 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
3e5111
@@ -203,6 +203,8 @@
3e5111
   <flag name='query-cpu-definitions'/>
3e5111
   <flag name='block-write-threshold'/>
3e5111
   <flag name='query-named-block-nodes'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
+  <flag name='kernel-irqchip.split'/>
3e5111
   <version>2008000</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package> (v2.8.0)</package>
3e5111
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
3e5111
index 83ed0f1c6..e4cdca89a 100644
3e5111
--- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
3e5111
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
3e5111
@@ -209,6 +209,8 @@
3e5111
   <flag name='query-named-block-nodes'/>
3e5111
   <flag name='cpu-cache'/>
3e5111
   <flag name='qemu-xhci'/>
3e5111
+  <flag name='kernel-irqchip'/>
3e5111
+  <flag name='kernel-irqchip.split'/>
3e5111
   <version>2008090</version>
3e5111
   <kvmVersion>0</kvmVersion>
3e5111
   <package> (v2.9.0-rc0-142-g940a8ce)</package>
3e5111
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
3e5111
new file mode 100644
3e5111
index 000000000..43d71adfc
3e5111
--- /dev/null
3e5111
+++ b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
3e5111
@@ -0,0 +1,19 @@
3e5111
+LC_ALL=C \
3e5111
+PATH=/bin \
3e5111
+HOME=/home/test \
3e5111
+USER=test \
3e5111
+LOGNAME=test \
3e5111
+QEMU_AUDIO_DRV=none \
3e5111
+/usr/bin/qemu-system-x86_64 \
3e5111
+-name QEMUGuest1 \
3e5111
+-S \
3e5111
+-machine q35,accel=kvm,kernel_irqchip=split \
3e5111
+-m 214 \
3e5111
+-smp 1,sockets=1,cores=1,threads=1 \
3e5111
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
3e5111
+-nographic \
3e5111
+-nodefaults \
3e5111
+-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
3e5111
+-no-acpi \
3e5111
+-boot c \
3e5111
+-device intel-iommu
3e5111
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
3e5111
index 406fbfea4..c7aad297c 100644
3e5111
--- a/tests/qemuxml2argvtest.c
3e5111
+++ b/tests/qemuxml2argvtest.c
3e5111
@@ -2517,6 +2517,11 @@ mymain(void)
3e5111
     DO_TEST("intel-iommu-machine",
3e5111
             QEMU_CAPS_MACHINE_OPT,
3e5111
             QEMU_CAPS_MACHINE_IOMMU);
3e5111
+    DO_TEST("intel-iommu-ioapic",
3e5111
+            QEMU_CAPS_MACHINE_OPT,
3e5111
+            QEMU_CAPS_MACHINE_KERNEL_IRQCHIP,
3e5111
+            QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT,
3e5111
+            QEMU_CAPS_DEVICE_INTEL_IOMMU);
3e5111
 
3e5111
     DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS);
3e5111
 
3e5111
-- 
3e5111
2.13.0
3e5111