</kvm>
<pvspinlock state='on'/>
<gic version='2'/>
+ <ioapic driver='qemu'/>
</features>
...</pre>
for hypervisor to decide.
<span class="since">Since 2.1.0</span>
</dd>
+ <dt><code>ioapic</code></dt>
+ <dd>Tune the I/O APIC. Possible values for the
+ <code>driver</code> attribute are:
+ <code>kvm</code> (default for KVM domains)
+ and <code>qemu</code> which puts I/O APIC in userspace
+ which is also known as a split I/O APIC mode.
+ <span class="since">Since 3.4.0</span> (QEMU/KVM only)
+ </dd>
</dl>
<h3><a name="elementsTime">Time keeping</a></h3>
</optional>
</element>
</optional>
+ <optional>
+ <ref name="ioapic"/>
+ </optional>
</interleave>
</element>
</optional>
</element>
</define>
+ <define name="ioapic">
+ <element name="ioapic">
+ <attribute name="driver">
+ <choice>
+ <value>qemu</value>
+ <value>kvm</value>
+ </choice>
+ </attribute>
+ <empty/>
+ </element>
+ </define>
+
<define name="address">
<element name="address">
<choice>
"pmu",
"vmport",
"gic",
- "smm")
+ "smm",
+ "ioapic")
VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, VIR_DOMAIN_CAPABILITIES_POLICY_LAST,
"default",
"rom",
"pflash")
+VIR_ENUM_IMPL(virDomainIOAPIC,
+ VIR_DOMAIN_IOAPIC_LAST,
+ "qemu",
+ "kvm")
+
/* Internal mapping: subset of block job types that can be present in
* <mirror> XML (remaining types are not two-phase). */
VIR_ENUM_DECL(virDomainBlockJob)
ctxt->node = node;
break;
+ case VIR_DOMAIN_FEATURE_IOAPIC:
+ node = ctxt->node;
+ ctxt->node = nodes[i];
+ tmp = virXPathString("string(./@driver)", ctxt);
+ if (tmp) {
+ int value = virDomainIOAPICTypeFromString(tmp);
+ if (value < 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Unknown driver mode: %s"),
+ tmp);
+ goto error;
+ }
+ def->ioapic = value;
+ def->features[val] = VIR_TRISTATE_SWITCH_ON;
+ }
+ ctxt->node = node;
+ break;
+
/* coverity[dead_error_begin] */
case VIR_DOMAIN_FEATURE_LAST:
break;
}
break;
+ case VIR_DOMAIN_FEATURE_IOAPIC:
+ if (def->features[i] == VIR_TRISTATE_SWITCH_ON) {
+ virBufferAsprintf(buf, "<ioapic driver='%s'/>\n",
+ virDomainIOAPICTypeToString(def->ioapic));
+ }
+ break;
+
/* coverity[dead_error_begin] */
case VIR_DOMAIN_FEATURE_LAST:
break;
VIR_DOMAIN_FEATURE_VMPORT,
VIR_DOMAIN_FEATURE_GIC,
VIR_DOMAIN_FEATURE_SMM,
+ VIR_DOMAIN_FEATURE_IOAPIC,
VIR_DOMAIN_FEATURE_LAST
} virDomainFeature;
void virDomainLoaderDefFree(virDomainLoaderDefPtr loader);
+typedef enum {
+ VIR_DOMAIN_IOAPIC_QEMU = 0,
+ VIR_DOMAIN_IOAPIC_KVM,
+
+ VIR_DOMAIN_IOAPIC_LAST
+} virDomainIOAPIC;
+
+VIR_ENUM_DECL(virDomainIOAPIC);
+
/* Operating system configuration data & machine / arch */
typedef struct _virDomainOSDef virDomainOSDef;
typedef virDomainOSDef *virDomainOSDefPtr;
unsigned int hyperv_spinlocks;
virGICVersion gic_version;
char *hyperv_vendor_id;
+ virDomainIOAPIC ioapic;
/* These options are of type virTristateSwitch: ON = keep, OFF = drop */
int caps_features[VIR_DOMAIN_CAPS_FEATURE_LAST];
--- /dev/null
+<domain type='kvm'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='q35'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <ioapic driver='qemu'/>
+ </features>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+ </controller>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ <iommu model='intel'/>
+ </devices>
+</domain>
--- /dev/null
+../qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml
\ No newline at end of file
DO_TEST("intel-iommu-machine",
QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_IOMMU);
+ DO_TEST("intel-iommu-ioapic", NONE);
DO_TEST("cpu-check-none", NONE);
DO_TEST("cpu-check-partial", NONE);