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.3.1.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml | 1 -
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 +-
.../qemuxml2argvdata/aarch64-cpu-passthrough.args | 2 +-
tests/qemuxml2argvdata/aarch64-kvm-32-on-64.args | 2 +-
tests/qemuxml2argvdata/aarch64-noacpi-nouefi.args | 2 +-
[...]
tests/qemuxml2argvdata/watchdog-injectnmi.args | 2 +-
tests/qemuxml2argvdata/watchdog.args | 2 +-
tests/qemuxml2argvtest.c | 142 +++++----
tests/qemuxml2xmltest.c | 2 -
598 files changed, 772 insertions(+), 854 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c048aed35..245f81986 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -3627,7 +3627,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 41348a32a..74f02ff3f 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 ed04a2a35..b85bad8da 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7001,6 +7001,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;
@@ -7013,228 +7016,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.3.1.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml
index 3efbb49cc..911e24eb9 100644
--- a/tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.3.1.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='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml
index 6af2dd804..013cc78eb 100644
--- a/tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_1.4.2.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='pci-bridge'/>
<flag name='vfio-pci'/>
diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
index 37baf9e19..efe137cb1 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 230503fcd..a32e1adfd 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 db783df5d..ff7caea2a 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 30876c65e..6d3623bbd 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 33c53aab9..11c183ce4 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 b10920977..34c69fa4d 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 b2f5f47a9..cbff80591 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 33e32d665..d2b68a5b6 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 467852aff..d61ba1453 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 dde70aa79..646e7440a 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 1f64f22c7..c5a6418f3 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 6c4a7dff5..3cdf9daa1 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 87d91edeb..9873f5ee6 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 e6be20b2b..0a7346721 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 321e3dccb..5484a3995 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 09289e65b..88f6087f3 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 2dba28228..a87fa6b92 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 f5c6ecd6a..9a50253bb 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 22a87c596..86af6a52d 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 a386d75ce..42532805a 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 9a682f3f0..4eacbfe16 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 c4488303f..89e0d453a 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 a9760cebd..40b0b4b6a 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 f2a591787..a9a739f95 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 6f743a02e..3a5c611c0 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 6f332941c..6a25e5317 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 \
diff --git a/tests/qemuxml2argvdata/aarch64-acpi-uefi.args
b/tests/qemuxml2argvdata/aarch64-acpi-uefi.args
index 8c8dbbe9e..0b6156a97 100644
--- a/tests/qemuxml2argvdata/aarch64-acpi-uefi.args
+++ b/tests/qemuxml2argvdata/aarch64-acpi-uefi.args
@@ -7,7 +7,7 @@ QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-aarch64 \
-name guest \
-S \
--M virt \
+-machine virt,accel=tcg \
-cpu cortex-a57 \
-drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,\
readonly=on \
diff --git a/tests/qemuxml2argvdata/aarch64-cpu-passthrough.args
b/tests/qemuxml2argvdata/aarch64-cpu-passthrough.args
index 8f6193a4f..29da75e06 100644
--- a/tests/qemuxml2argvdata/aarch64-cpu-passthrough.args
+++ b/tests/qemuxml2argvdata/aarch64-cpu-passthrough.args
@@ -7,7 +7,7 @@ QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-aarch64 \
-name aarch64test \
-S \
--M virt \
+-machine virt,accel=kvm \
-cpu host \
-m 1024 \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/aarch64-kvm-32-on-64.args
b/tests/qemuxml2argvdata/aarch64-kvm-32-on-64.args
index 70a1f3bf9..52077362b 100644
--- a/tests/qemuxml2argvdata/aarch64-kvm-32-on-64.args
+++ b/tests/qemuxml2argvdata/aarch64-kvm-32-on-64.args
@@ -7,7 +7,7 @@ QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-arm \
-name armtest \
-S \
--M virt \
+-machine virt,accel=kvm \
-cpu host,aarch64=off \
-m 1024 \
-smp 1,sockets=1,cores=1,threads=1 \
[...]
diff --git a/tests/qemuxml2argvdata/watchdog.args b/tests/qemuxml2argvdata/watchdog.args
index 218470702..21b763e6b 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 f0a4fa141..cb1ee9acf 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -694,32 +694,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);
@@ -775,7 +774,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);
@@ -861,7 +859,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);
@@ -1683,7 +1681,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,
@@ -1752,11 +1749,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",
@@ -2122,7 +2118,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,
@@ -2369,86 +2364,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,
@@ -2509,110 +2503,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);
@@ -2672,10 +2666,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,
@@ -2687,14 +2679,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 20b07f32c..8d7874ad3 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