8f756c33df
- qemu: add support for 288 VCPUS aeda1b8c-qemu-no-error-shutdown.patch, 8023b21a-conf-ioapic.patch, 6b5c6314-qemu-irqchip.patch, 2020e2c6-conf-intremap.patch, 04028a9d-qemu-intremap.patch, d12781b4-conf-iommu-cache-mode-attr.patch, a5691448-qemu-iommu-cache-mode.patch, 3a276c65-conf-iommu-def-stability-check.patch, 935d927a-conf-iommu-ABI-stability-check.patch FATE#321335 - revert commit 2841e675: qemu: propagate bridge MTU into qemu "host_mtu" revert-2841e675-mtu.patch bsc#1037774 OBS-URL: https://build.opensuse.org/request/show/495125 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=602
364 lines
14 KiB
Diff
364 lines
14 KiB
Diff
commit 6b5c6314b2f7a3b54c94a591e6b0dcd13ef1c6ce
|
|
Author: Ján Tomko <jtomko@redhat.com>
|
|
Date: Fri Mar 17 08:26:49 2017 +0100
|
|
|
|
qemu: format kernel_irqchip on the command line
|
|
|
|
Add kernel_irqchip=split/on to the QEMU command line
|
|
and a capability that looks for it in query-command-line-options
|
|
output. For the 'split' option, use a version check
|
|
since it cannot be reasonably probed.
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1427005
|
|
|
|
Index: libvirt-3.3.0/src/qemu/qemu_capabilities.c
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/src/qemu/qemu_capabilities.c
|
|
+++ libvirt-3.3.0/src/qemu/qemu_capabilities.c
|
|
@@ -366,6 +366,9 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAS
|
|
"query-named-block-nodes",
|
|
"cpu-cache",
|
|
"qemu-xhci",
|
|
+
|
|
+ "kernel-irqchip", /* 255 */
|
|
+ "kernel-irqchip.split",
|
|
);
|
|
|
|
|
|
@@ -3127,6 +3130,7 @@ static struct virQEMUCapsCommandLineProp
|
|
{ "drive", "throttling.bps-total-max-length", QEMU_CAPS_DRIVE_IOTUNE_MAX_LENGTH },
|
|
{ "drive", "throttling.group", QEMU_CAPS_DRIVE_IOTUNE_GROUP },
|
|
{ "spice", "rendernode", QEMU_CAPS_SPICE_RENDERNODE },
|
|
+ { "machine", "kernel_irqchip", QEMU_CAPS_MACHINE_KERNEL_IRQCHIP },
|
|
};
|
|
|
|
static int
|
|
@@ -4739,6 +4743,10 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr
|
|
if (qemuCaps->version >= 2004050)
|
|
virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
|
|
|
+ /* no way to query if -machine kernel_irqchip supports split */
|
|
+ if (qemuCaps->version >= 2006000)
|
|
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT);
|
|
+
|
|
if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
|
|
goto cleanup;
|
|
|
|
Index: libvirt-3.3.0/src/qemu/qemu_capabilities.h
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/src/qemu/qemu_capabilities.h
|
|
+++ libvirt-3.3.0/src/qemu/qemu_capabilities.h
|
|
@@ -404,6 +404,10 @@ typedef enum {
|
|
QEMU_CAPS_CPU_CACHE, /* -cpu supports host-cache-info and l3-cache properties */
|
|
QEMU_CAPS_DEVICE_QEMU_XHCI, /* -device qemu-xhci */
|
|
|
|
+ /* 255 */
|
|
+ QEMU_CAPS_MACHINE_KERNEL_IRQCHIP, /* -machine kernel_irqchip */
|
|
+ QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT, /* -machine kernel_irqchip=split */
|
|
+
|
|
QEMU_CAPS_LAST /* this must always be the last item */
|
|
} virQEMUCapsFlags;
|
|
|
|
Index: libvirt-3.3.0/src/qemu/qemu_command.c
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/src/qemu/qemu_command.c
|
|
+++ libvirt-3.3.0/src/qemu/qemu_command.c
|
|
@@ -7422,6 +7422,31 @@ qemuBuildMachineCommandLine(virCommandPt
|
|
}
|
|
}
|
|
|
|
+ if (def->features[VIR_DOMAIN_FEATURE_IOAPIC] == VIR_TRISTATE_SWITCH_ON) {
|
|
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP)) {
|
|
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
+ _("I/O APIC tuning is not supported by this "
|
|
+ "QEMU binary"));
|
|
+ goto cleanup;
|
|
+ }
|
|
+ switch (def->ioapic) {
|
|
+ case VIR_DOMAIN_IOAPIC_QEMU:
|
|
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT)) {
|
|
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
+ _("split I/O APIC is not supported by this "
|
|
+ "QEMU binary"));
|
|
+ goto cleanup;
|
|
+ }
|
|
+ virBufferAddLit(&buf, ",kernel_irqchip=split");
|
|
+ break;
|
|
+ case VIR_DOMAIN_IOAPIC_KVM:
|
|
+ virBufferAddLit(&buf, ",kernel_irqchip=on");
|
|
+ break;
|
|
+ case VIR_DOMAIN_IOAPIC_LAST:
|
|
+ break;
|
|
+ }
|
|
+ }
|
|
+
|
|
virCommandAddArgBuffer(cmd, &buf);
|
|
}
|
|
|
|
Index: libvirt-3.3.0/src/qemu/qemu_domain.c
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/src/qemu/qemu_domain.c
|
|
+++ libvirt-3.3.0/src/qemu/qemu_domain.c
|
|
@@ -2807,6 +2807,22 @@ qemuDomainDefCPUPostParse(virDomainDefPt
|
|
|
|
|
|
static int
|
|
+qemuDomainDefVerifyFeatures(const virDomainDef *def)
|
|
+{
|
|
+ if (def->features[VIR_DOMAIN_FEATURE_IOAPIC] == VIR_TRISTATE_SWITCH_ON &&
|
|
+ !ARCH_IS_X86(def->os.arch)) {
|
|
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
|
+ _("I/O APIC tuning is not supported "
|
|
+ "for '%s' architecture"),
|
|
+ virArchToString(def->os.arch));
|
|
+ return -1;
|
|
+ }
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+
|
|
+
|
|
+static int
|
|
qemuDomainDefPostParse(virDomainDefPtr def,
|
|
virCapsPtr caps,
|
|
unsigned int parseFlags,
|
|
@@ -2861,6 +2877,9 @@ qemuDomainDefPostParse(virDomainDefPtr d
|
|
|
|
qemuDomainDefEnableDefaultFeatures(def, qemuCaps);
|
|
|
|
+ if (qemuDomainDefVerifyFeatures(def) < 0)
|
|
+ goto cleanup;
|
|
+
|
|
if (qemuDomainRecheckInternalPaths(def, cfg, parseFlags) < 0)
|
|
goto cleanup;
|
|
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
|
|
@@ -140,6 +140,7 @@
|
|
<flag name='display'/>
|
|
<flag name='vhost-scsi'/>
|
|
<flag name='query-cpu-definitions'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
<version>1005003</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package></package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
|
|
@@ -145,6 +145,7 @@
|
|
<flag name='display'/>
|
|
<flag name='vhost-scsi'/>
|
|
<flag name='query-cpu-definitions'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
<version>1006000</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package></package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
|
|
@@ -147,6 +147,7 @@
|
|
<flag name='display'/>
|
|
<flag name='vhost-scsi'/>
|
|
<flag name='query-cpu-definitions'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
<version>1007000</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package></package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
|
|
@@ -163,6 +163,7 @@
|
|
<flag name='vhost-scsi'/>
|
|
<flag name='query-cpu-definitions'/>
|
|
<flag name='query-named-block-nodes'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
<version>2001001</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package></package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
|
|
@@ -185,6 +185,7 @@
|
|
<flag name='query-cpu-definitions'/>
|
|
<flag name='block-write-threshold'/>
|
|
<flag name='query-named-block-nodes'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
<version>2004000</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package></package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
|
|
@@ -191,6 +191,7 @@
|
|
<flag name='query-cpu-definitions'/>
|
|
<flag name='block-write-threshold'/>
|
|
<flag name='query-named-block-nodes'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
<version>2005000</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package></package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
|
|
@@ -168,6 +168,8 @@
|
|
<flag name='query-cpu-definitions'/>
|
|
<flag name='block-write-threshold'/>
|
|
<flag name='query-named-block-nodes'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
+ <flag name='kernel-irqchip.split'/>
|
|
<version>2006000</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package></package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
|
|
@@ -168,6 +168,8 @@
|
|
<flag name='query-cpu-definitions'/>
|
|
<flag name='block-write-threshold'/>
|
|
<flag name='query-named-block-nodes'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
+ <flag name='kernel-irqchip.split'/>
|
|
<version>2006000</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package></package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
|
|
@@ -162,6 +162,8 @@
|
|
<flag name='query-cpu-definitions'/>
|
|
<flag name='block-write-threshold'/>
|
|
<flag name='query-named-block-nodes'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
+ <flag name='kernel-irqchip.split'/>
|
|
<version>2006000</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package></package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
|
|
@@ -200,6 +200,8 @@
|
|
<flag name='query-cpu-definitions'/>
|
|
<flag name='block-write-threshold'/>
|
|
<flag name='query-named-block-nodes'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
+ <flag name='kernel-irqchip.split'/>
|
|
<version>2006000</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package></package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
|
|
@@ -130,6 +130,8 @@
|
|
<flag name='query-cpu-definitions'/>
|
|
<flag name='block-write-threshold'/>
|
|
<flag name='query-named-block-nodes'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
+ <flag name='kernel-irqchip.split'/>
|
|
<version>2007000</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package></package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
|
|
@@ -202,6 +202,8 @@
|
|
<flag name='query-cpu-definitions'/>
|
|
<flag name='block-write-threshold'/>
|
|
<flag name='query-named-block-nodes'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
+ <flag name='kernel-irqchip.split'/>
|
|
<version>2007000</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package> (v2.7.0)</package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
|
|
@@ -132,6 +132,8 @@
|
|
<flag name='query-cpu-definitions'/>
|
|
<flag name='block-write-threshold'/>
|
|
<flag name='query-named-block-nodes'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
+ <flag name='kernel-irqchip.split'/>
|
|
<version>2007093</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package></package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
|
|
@@ -203,6 +203,8 @@
|
|
<flag name='query-cpu-definitions'/>
|
|
<flag name='block-write-threshold'/>
|
|
<flag name='query-named-block-nodes'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
+ <flag name='kernel-irqchip.split'/>
|
|
<version>2008000</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package> (v2.8.0)</package>
|
|
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
|
|
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
|
|
@@ -210,6 +210,8 @@
|
|
<flag name='query-named-block-nodes'/>
|
|
<flag name='cpu-cache'/>
|
|
<flag name='qemu-xhci'/>
|
|
+ <flag name='kernel-irqchip'/>
|
|
+ <flag name='kernel-irqchip.split'/>
|
|
<version>2009000</version>
|
|
<kvmVersion>0</kvmVersion>
|
|
<package> (v2.9.0)</package>
|
|
Index: libvirt-3.3.0/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ libvirt-3.3.0/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
|
|
@@ -0,0 +1,19 @@
|
|
+LC_ALL=C \
|
|
+PATH=/bin \
|
|
+HOME=/home/test \
|
|
+USER=test \
|
|
+LOGNAME=test \
|
|
+QEMU_AUDIO_DRV=none \
|
|
+/usr/bin/qemu-system-x86_64 \
|
|
+-name QEMUGuest1 \
|
|
+-S \
|
|
+-machine q35,accel=kvm,kernel_irqchip=split \
|
|
+-m 214 \
|
|
+-smp 1,sockets=1,cores=1,threads=1 \
|
|
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
|
+-nographic \
|
|
+-nodefaults \
|
|
+-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
|
|
+-no-acpi \
|
|
+-boot c \
|
|
+-device intel-iommu
|
|
Index: libvirt-3.3.0/tests/qemuxml2argvtest.c
|
|
===================================================================
|
|
--- libvirt-3.3.0.orig/tests/qemuxml2argvtest.c
|
|
+++ libvirt-3.3.0/tests/qemuxml2argvtest.c
|
|
@@ -2509,6 +2509,11 @@ mymain(void)
|
|
DO_TEST("intel-iommu-machine",
|
|
QEMU_CAPS_MACHINE_OPT,
|
|
QEMU_CAPS_MACHINE_IOMMU);
|
|
+ DO_TEST("intel-iommu-ioapic",
|
|
+ QEMU_CAPS_MACHINE_OPT,
|
|
+ QEMU_CAPS_MACHINE_KERNEL_IRQCHIP,
|
|
+ QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT,
|
|
+ QEMU_CAPS_DEVICE_INTEL_IOMMU);
|
|
|
|
DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS);
|
|
|