Implied by QEMU >= 1.2.0.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 317 +++++++++------------
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 -
.../aarch64-aavmf-virtio-mmio.args | 2 +-
tests/qemuxml2argvdata/aarch64-acpi-uefi.args | 2 +-
[ ... etc ... ]
tests/qemuxml2argvdata/watchdog-injectnmi.args | 2 +-
tests/qemuxml2argvdata/watchdog.args | 2 +-
tests/qemuxml2argvtest.c | 142 +++++----
tests/qemuxml2xmltest.c | 2 -
597 files changed, 773 insertions(+), 853 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index ce9fad52a3..6af3cc9d61 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3629,7 +3629,6 @@ static qemuMonitorCallbacks callbacks = {
static void
virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps)
{
- virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_OPT);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_SHARE_POLICY);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_HOST_PCI_MULTIDOMAIN);
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index c57554db4f..f1a55c421d 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -238,7 +238,7 @@ typedef enum {
/* 135 */
X_QEMU_CAPS_IPV6_MIGRATION, /* -incoming [::] */
- QEMU_CAPS_MACHINE_OPT, /* -machine xxxx*/
+ X_QEMU_CAPS_MACHINE_OPT, /* -machine xxxx*/
QEMU_CAPS_MACHINE_USB_OPT, /* -machine xxx,usb=on/off */
QEMU_CAPS_DEVICE_TPM_PASSTHROUGH, /* -tpmdev passthrough */
QEMU_CAPS_DEVICE_TPM_TIS, /* -device tpm_tis */
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 45722aa1fe..e6c70f84bf 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6996,6 +6996,9 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
const virDomainDef *def,
virQEMUCapsPtr qemuCaps)
{
+ virTristateSwitch vmport = def->features[VIR_DOMAIN_FEATURE_VMPORT];
+ virTristateSwitch smm = def->features[VIR_DOMAIN_FEATURE_SMM];
+ virCPUDefPtr cpu = def->cpu;
virBuffer buf = VIR_BUFFER_INITIALIZER;
bool obsoleteAccel = false;
size_t i;
@@ -7008,228 +7011,186 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
if (!def->os.machine)
return 0;
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_OPT)) {
- /* if no parameter to the machine type is needed, we still use
- * '-M' to keep the most of the compatibility with older versions.
- */
- virCommandAddArgList(cmd, "-M", def->os.machine, NULL);
- if (def->mem.dump_core) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("dump-guest-core is not available "
- "with this QEMU binary"));
- return -1;
- }
-
- if (def->mem.nosharepages) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("disable shared memory is not available "
- "with this QEMU binary"));
- return -1;
- }
+ virCommandAddArg(cmd, "-machine");
+ virBufferAdd(&buf, def->os.machine, -1);
+ if (def->virtType == VIR_DOMAIN_VIRT_QEMU)
+ virBufferAddLit(&buf, ",accel=tcg");
+ else if (def->virtType == VIR_DOMAIN_VIRT_KVM)
+ virBufferAddLit(&buf, ",accel=kvm");
+ else
obsoleteAccel = true;
- if (def->keywrap) {
+ /* To avoid the collision of creating USB controllers when calling
+ * machine->init in QEMU, it needs to set usb=off
+ */
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_USB_OPT))
+ virBufferAddLit(&buf, ",usb=off");
+
+ if (vmport) {
+ if (!virQEMUCapsSupportsVmport(qemuCaps, def)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("key wrap support is not available "
+ _("vmport is not available "
"with this QEMU binary"));
- return -1;
- }
-
- for (i = 0; i < def->nmems; i++) {
- if (def->mems[i]->model == VIR_DOMAIN_MEMORY_MODEL_NVDIMM) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("nvdimm is not available "
- "with this QEMU binary"));
- return -1;
- }
+ goto cleanup;
}
- } else {
- virTristateSwitch vmport = def->features[VIR_DOMAIN_FEATURE_VMPORT];
- virTristateSwitch smm = def->features[VIR_DOMAIN_FEATURE_SMM];
- virCPUDefPtr cpu = def->cpu;
-
- virCommandAddArg(cmd, "-machine");
- virBufferAdd(&buf, def->os.machine, -1);
-
- if (def->virtType == VIR_DOMAIN_VIRT_QEMU)
- virBufferAddLit(&buf, ",accel=tcg");
- else if (def->virtType == VIR_DOMAIN_VIRT_KVM)
- virBufferAddLit(&buf, ",accel=kvm");
- else
- obsoleteAccel = true;
-
- /* To avoid the collision of creating USB controllers when calling
- * machine->init in QEMU, it needs to set usb=off
- */
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_USB_OPT))
- virBufferAddLit(&buf, ",usb=off");
- if (vmport) {
- if (!virQEMUCapsSupportsVmport(qemuCaps, def)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("vmport is not available "
- "with this QEMU binary"));
- goto cleanup;
- }
+ virBufferAsprintf(&buf, ",vmport=%s",
+ virTristateSwitchTypeToString(vmport));
+ }
- virBufferAsprintf(&buf, ",vmport=%s",
- virTristateSwitchTypeToString(vmport));
+ if (smm) {
+ if (!virQEMUCapsSupportsSMM(qemuCaps, def)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("smm is not available with this QEMU binary"));
+ goto cleanup;
}
- if (smm) {
- if (!virQEMUCapsSupportsSMM(qemuCaps, def)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("smm is not available with this QEMU
binary"));
- goto cleanup;
- }
-
- virBufferAsprintf(&buf, ",smm=%s",
- virTristateSwitchTypeToString(smm));
- }
+ virBufferAsprintf(&buf, ",smm=%s",
+ virTristateSwitchTypeToString(smm));
+ }
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE)) {
- if (def->mem.dump_core) {
- virBufferAsprintf(&buf, ",dump-guest-core=%s",
- virTristateSwitchTypeToString(def->mem.dump_core));
- } else {
- virBufferAsprintf(&buf, ",dump-guest-core=%s",
- cfg->dumpGuestCore ? "on" :
"off");
- }
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE)) {
+ if (def->mem.dump_core) {
+ virBufferAsprintf(&buf, ",dump-guest-core=%s",
+ virTristateSwitchTypeToString(def->mem.dump_core));
} else {
- if (def->mem.dump_core) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("dump-guest-core is not available "
- "with this QEMU binary"));
- goto cleanup;
- }
+ virBufferAsprintf(&buf, ",dump-guest-core=%s",
+ cfg->dumpGuestCore ? "on" : "off");
}
-
- if (def->mem.nosharepages) {
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MEM_MERGE)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("disable shared memory is not available "
- "with this QEMU binary"));
- goto cleanup;
- }
-
- virBufferAddLit(&buf, ",mem-merge=off");
+ } else {
+ if (def->mem.dump_core) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("dump-guest-core is not available "
+ "with this QEMU binary"));
+ goto cleanup;
}
+ }
- if (def->keywrap &&
- !qemuAppendKeyWrapMachineParms(&buf, qemuCaps, def->keywrap))
+ if (def->mem.nosharepages) {
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MEM_MERGE)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("disable shared memory is not available "
+ "with this QEMU binary"));
goto cleanup;
+ }
- if (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON) {
- if (def->gic_version != VIR_GIC_VERSION_NONE) {
- /* The default GIC version (GICv2) should not be specified on
- * the QEMU commandline for backwards compatibility reasons */
- if (def->gic_version != VIR_GIC_VERSION_2) {
- if (!virQEMUCapsGet(qemuCaps,
- QEMU_CAPS_MACH_VIRT_GIC_VERSION)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("gic-version option is not available
"
- "with this QEMU binary"));
- goto cleanup;
- }
+ virBufferAddLit(&buf, ",mem-merge=off");
+ }
- virBufferAsprintf(&buf, ",gic-version=%s",
- virGICVersionTypeToString(def->gic_version));
- }
- }
- }
+ if (def->keywrap &&
+ !qemuAppendKeyWrapMachineParms(&buf, qemuCaps, def->keywrap))
+ goto cleanup;
- /* We don't report errors on missing cap here - -device code will do that */
- if (def->iommu &&
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_IOMMU)) {
- switch (def->iommu->model) {
- case VIR_DOMAIN_IOMMU_MODEL_INTEL:
- if (!qemuDomainIsQ35(def)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("IOMMU device: '%s' is only supported
with "
- "Q35 machines"),
-
virDomainIOMMUModelTypeToString(def->iommu->model));
- return -1;
+ if (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON) {
+ if (def->gic_version != VIR_GIC_VERSION_NONE) {
+ /* The default GIC version (GICv2) should not be specified on
+ * the QEMU commandline for backwards compatibility reasons */
+ if (def->gic_version != VIR_GIC_VERSION_2) {
+ if (!virQEMUCapsGet(qemuCaps,
+ QEMU_CAPS_MACH_VIRT_GIC_VERSION)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("gic-version option is not available "
+ "with this QEMU binary"));
+ goto cleanup;
}
- virBufferAddLit(&buf, ",iommu=on");
- break;
- case VIR_DOMAIN_IOMMU_MODEL_LAST:
- break;
+
+ virBufferAsprintf(&buf, ",gic-version=%s",
+ virGICVersionTypeToString(def->gic_version));
}
}
+ }
- for (i = 0; i < def->nmems; i++) {
- if (def->mems[i]->model == VIR_DOMAIN_MEMORY_MODEL_NVDIMM) {
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_NVDIMM)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("nvdimm isn't supported by this QEMU
binary"));
- goto cleanup;
- }
- virBufferAddLit(&buf, ",nvdimm=on");
- break;
+ /* We don't report errors on missing cap here - -device code will do that */
+ if (def->iommu &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_IOMMU)) {
+ switch (def->iommu->model) {
+ case VIR_DOMAIN_IOMMU_MODEL_INTEL:
+ if (!qemuDomainIsQ35(def)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("IOMMU device: '%s' is only supported with
"
+ "Q35 machines"),
+
virDomainIOMMUModelTypeToString(def->iommu->model));
+ return -1;
}
+ virBufferAddLit(&buf, ",iommu=on");
+ break;
+ case VIR_DOMAIN_IOMMU_MODEL_LAST:
+ break;
}
+ }
- if (def->features[VIR_DOMAIN_FEATURE_IOAPIC] != VIR_DOMAIN_IOAPIC_NONE) {
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP)) {
+ for (i = 0; i < def->nmems; i++) {
+ if (def->mems[i]->model == VIR_DOMAIN_MEMORY_MODEL_NVDIMM) {
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_NVDIMM)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("I/O APIC tuning is not supported by this "
- "QEMU binary"));
+ _("nvdimm isn't supported by this QEMU
binary"));
goto cleanup;
}
- switch ((virDomainIOAPIC) def->features[VIR_DOMAIN_FEATURE_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_NONE:
- case VIR_DOMAIN_IOAPIC_LAST:
- break;
- }
+ virBufferAddLit(&buf, ",nvdimm=on");
+ break;
}
+ }
- if (def->features[VIR_DOMAIN_FEATURE_HPT] != VIR_DOMAIN_HPT_RESIZING_NONE) {
- const char *str;
-
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT)) {
+ if (def->features[VIR_DOMAIN_FEATURE_IOAPIC] != VIR_DOMAIN_IOAPIC_NONE) {
+ 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 ((virDomainIOAPIC) def->features[VIR_DOMAIN_FEATURE_IOAPIC]) {
+ case VIR_DOMAIN_IOAPIC_QEMU:
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("HTP resizing is not supported by this "
+ _("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_NONE:
+ case VIR_DOMAIN_IOAPIC_LAST:
+ break;
+ }
+ }
- str =
virDomainHPTResizingTypeToString(def->features[VIR_DOMAIN_FEATURE_HPT]);
- if (!str) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Invalid setting for HPT resizing"));
- goto cleanup;
- }
+ if (def->features[VIR_DOMAIN_FEATURE_HPT] != VIR_DOMAIN_HPT_RESIZING_NONE) {
+ const char *str;
- virBufferAsprintf(&buf, ",resize-hpt=%s", str);
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("HTP resizing is not supported by this "
+ "QEMU binary"));
+ goto cleanup;
}
- if (cpu && cpu->model &&
- cpu->mode == VIR_CPU_MODE_HOST_MODEL &&
- qemuDomainIsPSeries(def) &&
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT)) {
- virBufferAsprintf(&buf, ",max-cpu-compat=%s", cpu->model);
+ str =
virDomainHPTResizingTypeToString(def->features[VIR_DOMAIN_FEATURE_HPT]);
+ if (!str) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Invalid setting for HPT resizing"));
+ goto cleanup;
}
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BOOTINDEX) &&
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_LOADPARM))
- qemuAppendLoadparmMachineParm(&buf, def);
+ virBufferAsprintf(&buf, ",resize-hpt=%s", str);
+ }
- virCommandAddArgBuffer(cmd, &buf);
+ if (cpu && cpu->model &&
+ cpu->mode == VIR_CPU_MODE_HOST_MODEL &&
+ qemuDomainIsPSeries(def) &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT)) {
+ virBufferAsprintf(&buf, ",max-cpu-compat=%s", cpu->model);
}
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BOOTINDEX) &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_LOADPARM))
+ qemuAppendLoadparmMachineParm(&buf, def);
+
+ virCommandAddArgBuffer(cmd, &buf);
+
if (obsoleteAccel &&
qemuBuildObsoleteAccelArg(cmd, def, qemuCaps) < 0)
goto cleanup;
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
index 37baf9e19a..efe137cb11 100644
--- a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
@@ -68,7 +68,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
index 230503fcd4..a32e1adfdb 100644
--- a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
@@ -69,7 +69,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
index db783df5dd..ff7caea2a0 100644
--- a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
@@ -69,7 +69,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
index 30876c65ec..6d3623bbd4 100644
--- a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
@@ -69,7 +69,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='tpm-passthrough'/>
<flag name='tpm-tis'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
index d900d9e34c..ea6688fffa 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml
@@ -53,7 +53,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
index 23a9127edd..bd2e845f40 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml
@@ -52,7 +52,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='nvram'/>
<flag name='pci-bridge'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
index d4a04ef112..a97e856614 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml
@@ -35,7 +35,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='virtio-ccw'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
index ea2d38b233..f563a69b8d 100644
--- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml
@@ -69,7 +69,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='tpm-passthrough'/>
<flag name='tpm-tis'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
index 0c4a118bd0..662b4905f2 100644
--- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml
@@ -35,7 +35,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='virtio-ccw'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
index aec0244c28..c9b363c1b1 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
@@ -53,7 +53,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
index 29822cda82..e98b4fef0a 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
@@ -52,7 +52,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='nvram'/>
<flag name='pci-bridge'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
index beeca334eb..6fa93d9bc8 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
@@ -35,7 +35,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='virtio-ccw'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
index 2dc1922d9f..c4774482f7 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -67,7 +67,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='tpm-passthrough'/>
<flag name='tpm-tis'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
index e6be20b2ba..0a7346721b 100644
--- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
@@ -69,7 +69,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='tpm-passthrough'/>
<flag name='tpm-tis'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
index 321e3dccbe..5484a39952 100644
--- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
@@ -69,7 +69,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='tpm-passthrough'/>
<flag name='tpm-tis'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml
index 09289e65b2..88f6087f35 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.aarch64.xml
@@ -55,7 +55,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml
index 2dba28228a..a87fa6b921 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml
@@ -52,7 +52,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='nvram'/>
<flag name='pci-bridge'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
index f5c6ecd6aa..9a50253bb0 100644
--- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
@@ -69,7 +69,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='tpm-passthrough'/>
<flag name='tpm-tis'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
index 22a87c596e..86af6a52d2 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
@@ -35,7 +35,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='virtio-ccw'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
index a386d75ce7..42532805a1 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
@@ -69,7 +69,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='tpm-passthrough'/>
<flag name='tpm-tis'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
index 9a682f3f06..4eacbfe168 100644
--- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
@@ -35,7 +35,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='virtio-ccw'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
index c4488303fa..89e0d453a9 100644
--- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
@@ -69,7 +69,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='tpm-passthrough'/>
<flag name='tpm-tis'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
index a9760cebda..40b0b4b6ae 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml
@@ -51,7 +51,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='nvram'/>
<flag name='pci-bridge'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
index f2a591787b..a9a739f956 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml
@@ -35,7 +35,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='virtio-ccw'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
index 6f743a02ea..3a5c611c0e 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
@@ -69,7 +69,6 @@
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
- <flag name='machine-opt'/>
<flag name='machine-usb-opt'/>
<flag name='tpm-passthrough'/>
<flag name='tpm-tis'/>
diff --git a/tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.args
b/tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.args
index 6f332941ce..6a25e53175 100644
--- a/tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.args
+++ b/tests/qemuxml2argvdata/aarch64-aavmf-virtio-mmio.args
@@ -7,7 +7,7 @@ QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-aarch64 \
-name aarch64test \
-S \
--M virt \
+-machine virt,accel=tcg \
-cpu cortex-a53 \
-m 1024 \
-smp 1,sockets=1,cores=1,threads=1 \
[ ... etc ...]
diff --git a/tests/qemuxml2argvdata/watchdog.args b/tests/qemuxml2argvdata/watchdog.args
index 218470702f..21b763e6b1 100644
--- a/tests/qemuxml2argvdata/watchdog.args
+++ b/tests/qemuxml2argvdata/watchdog.args
@@ -7,7 +7,7 @@ QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-i686 \
-name QEMUGuest1 \
-S \
--M pc \
+-machine pc,accel=tcg \
-m 214 \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index ed2bd8b240..670cd92b8f 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -732,32 +732,31 @@ mymain(void)
DO_TEST("minimal-msg-timestamp", QEMU_CAPS_MSG_TIMESTAMP);
DO_TEST("machine-aliases1", NONE);
DO_TEST("machine-aliases2", QEMU_CAPS_KVM);
- DO_TEST("machine-core-on", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST("machine-core-on",
QEMU_CAPS_DUMP_GUEST_CORE);
driver.config->dumpGuestCore = true;
- DO_TEST("machine-core-off", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST("machine-core-off",
QEMU_CAPS_DUMP_GUEST_CORE);
driver.config->dumpGuestCore = false;
- DO_TEST("machine-core-cfg-off", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST("machine-core-cfg-off",
QEMU_CAPS_DUMP_GUEST_CORE);
DO_TEST_FAILURE("machine-core-on", NONE);
- DO_TEST_FAILURE("machine-core-on", QEMU_CAPS_MACHINE_OPT);
+ DO_TEST_FAILURE("machine-core-on", NONE);
DO_TEST("machine-smm-opt",
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_IOH3420,
QEMU_CAPS_ICH9_AHCI,
- QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_SMM_OPT,
QEMU_CAPS_VIRTIO_SCSI);
- DO_TEST("machine-usb-opt", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST("machine-usb-opt",
QEMU_CAPS_MACHINE_USB_OPT);
- DO_TEST("machine-vmport-opt", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST("machine-vmport-opt",
QEMU_CAPS_MACHINE_VMPORT_OPT);
- DO_TEST("kvm", QEMU_CAPS_MACHINE_OPT);
- DO_TEST("default-kvm-host-arch", QEMU_CAPS_MACHINE_OPT);
- DO_TEST("default-qemu-host-arch", QEMU_CAPS_MACHINE_OPT);
- DO_TEST("x86-kvm-32-on-64", QEMU_CAPS_MACHINE_OPT);
+ DO_TEST("kvm", NONE);
+ DO_TEST("default-kvm-host-arch", NONE);
+ DO_TEST("default-qemu-host-arch", NONE);
+ DO_TEST("x86-kvm-32-on-64", NONE);
DO_TEST("boot-cdrom", NONE);
DO_TEST("boot-network", NONE);
DO_TEST("boot-floppy", NONE);
@@ -813,7 +812,6 @@ mymain(void)
QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_IOH3420,
QEMU_CAPS_ICH9_AHCI,
- QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_SMM_OPT,
QEMU_CAPS_VIRTIO_SCSI);
@@ -899,7 +897,7 @@ mymain(void)
DO_TEST_FAILURE("hugepages-memaccess3",
QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE,
QEMU_CAPS_VIRTIO_SCSI);
- DO_TEST("nosharepages", QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_MEM_MERGE);
+ DO_TEST("nosharepages", QEMU_CAPS_MEM_MERGE);
DO_TEST("disk-cdrom", NONE);
DO_TEST("disk-iscsi", NONE);
DO_TEST("disk-cdrom-network-http", QEMU_CAPS_KVM);
@@ -1726,7 +1724,6 @@ mymain(void)
QEMU_CAPS_DEVICE_SPAPR_VTY);
DO_TEST("pseries-machine-max-cpu-compat",
QEMU_CAPS_KVM,
- QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT,
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
DO_TEST("pseries-cpu-le", QEMU_CAPS_KVM,
@@ -1795,11 +1792,10 @@ mymain(void)
DO_TEST("pseries-features",
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
DO_TEST_FAILURE("pseries-features",
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_MACHINE_OPT);
+ NONE);
DO_TEST_PARSE_ERROR("pseries-features-invalid-machine", NONE);
DO_TEST("pseries-serial-native",
@@ -2165,7 +2161,6 @@ mymain(void)
QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
DO_TEST("q35-virt-manager-basic",
QEMU_CAPS_KVM,
- QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_VMPORT_OPT,
QEMU_CAPS_ICH9_DISABLE_S3,
QEMU_CAPS_ICH9_DISABLE_S4,
@@ -2412,86 +2407,85 @@ mymain(void)
QEMU_CAPS_DEVICE_VIRTIO_MMIO,
QEMU_CAPS_KVM);
DO_TEST_GIC("aarch64-gic-none", GIC_NONE,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
+ QEMU_CAPS_KVM, NONE);
DO_TEST_GIC("aarch64-gic-none", GIC_NONE,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-none-v2", GIC_V2,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-none-v3", GIC_V3,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-none-both", GIC_BOTH,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-none-tcg", GIC_BOTH,
- QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-default", GIC_NONE,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
+ QEMU_CAPS_KVM, NONE);
DO_TEST_GIC("aarch64-gic-default", GIC_NONE,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-default-v2", GIC_V2,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-default-v3", GIC_V3,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-default-both", GIC_BOTH,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-v2", GIC_NONE,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
+ QEMU_CAPS_KVM, NONE);
DO_TEST_GIC("aarch64-gic-v2", GIC_NONE,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-v2", GIC_V2,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-v2", GIC_V3,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-v2", GIC_BOTH,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_FAILURE("aarch64-gic-v3",
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
+ QEMU_CAPS_KVM, NONE);
DO_TEST_GIC("aarch64-gic-v3", GIC_NONE,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-v3", GIC_V2,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-v3", GIC_V3,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-v3", GIC_BOTH,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_FAILURE("aarch64-gic-host",
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
+ QEMU_CAPS_KVM, NONE);
DO_TEST_GIC("aarch64-gic-host", GIC_NONE,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-host", GIC_V2,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-host", GIC_V3,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_GIC("aarch64-gic-host", GIC_BOTH,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_PARSE_ERROR("aarch64-gic-invalid",
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_PARSE_ERROR("aarch64-gic-not-virt",
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_PARSE_ERROR("aarch64-gic-not-arm",
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_KVM,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST("aarch64-kvm-32-on-64",
QEMU_CAPS_DEVICE_VIRTIO_MMIO,
@@ -2552,110 +2546,110 @@ mymain(void)
DO_TEST("memory-hotplug-ppc64-nonuma", QEMU_CAPS_KVM,
QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA,
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("memory-hotplug-nvdimm", QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_DEVICE_NVDIMM,
+ DO_TEST("memory-hotplug-nvdimm", QEMU_CAPS_DEVICE_NVDIMM,
QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("memory-hotplug-nvdimm-access", QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_DEVICE_NVDIMM,
+ DO_TEST("memory-hotplug-nvdimm-access", QEMU_CAPS_DEVICE_NVDIMM,
QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("memory-hotplug-nvdimm-label", QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_DEVICE_NVDIMM,
+ DO_TEST("memory-hotplug-nvdimm-label", QEMU_CAPS_DEVICE_NVDIMM,
QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST("machine-aeskeywrap-on-caps",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_AES_KEY_WRAP,
+ QEMU_CAPS_AES_KEY_WRAP,
QEMU_CAPS_DEA_KEY_WRAP,
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
- DO_TEST_FAILURE("machine-aeskeywrap-on-caps", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST_FAILURE("machine-aeskeywrap-on-caps",
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
DO_TEST_FAILURE("machine-aeskeywrap-on-caps", NONE);
DO_TEST("machine-aeskeywrap-on-cap",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_AES_KEY_WRAP,
+ QEMU_CAPS_AES_KEY_WRAP,
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
- DO_TEST_FAILURE("machine-aeskeywrap-on-cap", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST_FAILURE("machine-aeskeywrap-on-cap",
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
DO_TEST_FAILURE("machine-aeskeywrap-on-cap", NONE);
DO_TEST("machine-aeskeywrap-off-caps",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP,
+ QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP,
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
- DO_TEST_FAILURE("machine-aeskeywrap-off-caps", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST_FAILURE("machine-aeskeywrap-off-caps",
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
DO_TEST_FAILURE("machine-aeskeywrap-off-caps", NONE);
DO_TEST("machine-aeskeywrap-off-cap",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_AES_KEY_WRAP,
+ QEMU_CAPS_AES_KEY_WRAP,
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
- DO_TEST_FAILURE("machine-aeskeywrap-off-cap", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST_FAILURE("machine-aeskeywrap-off-cap",
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
DO_TEST_FAILURE("machine-aeskeywrap-off-cap", NONE);
DO_TEST("machine-deakeywrap-on-caps",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP,
+ QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP,
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
- DO_TEST_FAILURE("machine-deakeywrap-on-caps", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST_FAILURE("machine-deakeywrap-on-caps",
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
DO_TEST_FAILURE("machine-deakeywrap-on-caps", NONE);
DO_TEST("machine-deakeywrap-on-cap",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_DEA_KEY_WRAP,
+ QEMU_CAPS_DEA_KEY_WRAP,
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
- DO_TEST_FAILURE("machine-deakeywrap-on-cap", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST_FAILURE("machine-deakeywrap-on-cap",
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
DO_TEST_FAILURE("machine-deakeywrap-on-cap", NONE);
DO_TEST("machine-deakeywrap-off-caps",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP,
+ QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP,
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
- DO_TEST_FAILURE("machine-deakeywrap-off-caps", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST_FAILURE("machine-deakeywrap-off-caps",
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
DO_TEST_FAILURE("machine-deakeywrap-off-caps", NONE);
DO_TEST("machine-deakeywrap-off-cap",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_DEA_KEY_WRAP,
+ QEMU_CAPS_DEA_KEY_WRAP,
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
- DO_TEST_FAILURE("machine-deakeywrap-off-cap", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST_FAILURE("machine-deakeywrap-off-cap",
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
DO_TEST_FAILURE("machine-deakeywrap-off-cap", NONE);
DO_TEST("machine-keywrap-none-caps",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP,
+ QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP,
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
DO_TEST("machine-keywrap-none",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_VIRTIO_SCSI,
+ QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
- DO_TEST("machine-loadparm-s390", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST("machine-loadparm-s390",
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390,
QEMU_CAPS_BOOTINDEX, QEMU_CAPS_LOADPARM);
- DO_TEST("machine-loadparm-net-s390", QEMU_CAPS_MACHINE_OPT,
+ DO_TEST("machine-loadparm-net-s390",
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390,
QEMU_CAPS_BOOTINDEX, QEMU_CAPS_LOADPARM);
DO_TEST("machine-loadparm-multiple-disks-nets-s390",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_VIRTIO_CCW,
+ QEMU_CAPS_VIRTIO_CCW,
QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_BOOTINDEX,
QEMU_CAPS_LOADPARM);
DO_TEST_PARSE_ERROR("machine-loadparm-s390-char-invalid",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_VIRTIO_CCW,
+ QEMU_CAPS_VIRTIO_CCW,
QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_BOOTINDEX,
QEMU_CAPS_LOADPARM);
DO_TEST_PARSE_ERROR("machine-loadparm-s390-len-invalid",
- QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_VIRTIO_CCW,
+ QEMU_CAPS_VIRTIO_CCW,
QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_BOOTINDEX,
QEMU_CAPS_LOADPARM);
@@ -2715,10 +2709,8 @@ mymain(void)
DO_TEST("intel-iommu",
QEMU_CAPS_DEVICE_INTEL_IOMMU);
DO_TEST("intel-iommu-machine",
- QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_IOMMU);
DO_TEST("intel-iommu-caching-mode",
- QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP,
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT,
QEMU_CAPS_DEVICE_PCI_BRIDGE,
@@ -2730,14 +2722,12 @@ mymain(void)
QEMU_CAPS_INTEL_IOMMU_INTREMAP,
QEMU_CAPS_INTEL_IOMMU_CACHING_MODE);
DO_TEST("intel-iommu-eim",
- QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP,
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT,
QEMU_CAPS_INTEL_IOMMU_INTREMAP,
QEMU_CAPS_INTEL_IOMMU_EIM,
QEMU_CAPS_DEVICE_INTEL_IOMMU);
DO_TEST("intel-iommu-device-iotlb",
- QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP,
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT,
QEMU_CAPS_INTEL_IOMMU_INTREMAP,
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 20b07f32cf..8d7874ad30 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -618,7 +618,6 @@ mymain(void)
DO_TEST("pseries-features",
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
DO_TEST("pseries-serial-native",
@@ -1135,7 +1134,6 @@ mymain(void)
DO_TEST("intel-iommu",
QEMU_CAPS_DEVICE_INTEL_IOMMU);
DO_TEST("intel-iommu-machine",
- QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_IOMMU);
DO_TEST("intel-iommu-caching-mode",
QEMU_CAPS_DEVICE_PCI_BRIDGE,
--
2.16.1