When starting a domain without a CPU model specified in the domain XML,
QEMU will choose a default one. Which is fine unless the domain gets
migrated to another host because libvirt doesn't perform any CPU ABI
checks and the virtual CPU provided by QEMU on the destination host can
differ from the one on the source host.
With QEMU 4.2.0 we can probe for the default CPU model used by QEMU for
a particular machine type and store it in the domain XML. This way the
chosen CPU model is more visible to users and libvirt will make sure
the guest will see the exact same CPU after migration.
Architecture specific notes
- aarch64: We only set the default CPU for TCG domains as KVM requires
explicit "-cpu host" to work.
- ppc64: The default CPU for KVM is "host" thanks to some hacks in QEMU,
we will translate the default model to the model corresponding to the
host CPU ("POWER8" on a Power8 host, "POWER9" on Power9 host,
etc.).
This is not a problem as the corresponding CPU model is in fact an
alias for "host". This is probably not ideal, but it's not wrong and
the default virtual CPU configured by libvirt is the same QEMU would
use. TCG uses various CPU models depending on machine type and its
version.
- s390x: The default CPU for KVM is "host" while TCG defaults to
"qemu".
- x86_64: The default CPU model (qemu64) is not runnable on any host
with KVM, but QEMU just disables unavailable features and starts
happily.
https://bugzilla.redhat.com/show_bug.cgi?id=1598151
https://bugzilla.redhat.com/show_bug.cgi?id=1598162
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
Notes:
Version 2:
- new test cases
Version 3:
- enable default CPU for KVM on s390 and ppc64
- handle "host" default CPU
src/qemu/qemu_domain.c | 61 +++++++++++++++++++
...fault-cpu-tcg-virt-4.2.aarch64-latest.args | 1 +
.../disk-cache.x86_64-latest.args | 1 +
.../disk-cdrom-network.x86_64-latest.args | 1 +
.../disk-cdrom-tray.x86_64-latest.args | 1 +
.../disk-copy_on_read.x86_64-latest.args | 1 +
.../disk-detect-zeroes.x86_64-latest.args | 1 +
.../disk-floppy-q35-2_11.x86_64-latest.args | 1 +
.../disk-floppy-q35-2_9.x86_64-latest.args | 1 +
.../os-firmware-bios.x86_64-latest.args | 1 +
...os-firmware-efi-secboot.x86_64-latest.args | 1 +
.../os-firmware-efi.x86_64-latest.args | 1 +
...ault-cpu-kvm-pseries-2.7.ppc64-latest.args | 1 +
...ault-cpu-kvm-pseries-3.1.ppc64-latest.args | 1 +
...ault-cpu-kvm-pseries-4.2.ppc64-latest.args | 1 +
...ault-cpu-tcg-pseries-2.7.ppc64-latest.args | 1 +
...ault-cpu-tcg-pseries-3.1.ppc64-latest.args | 1 +
...ault-cpu-tcg-pseries-4.2.ppc64-latest.args | 1 +
...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 1 +
...t-cpu-tcg-ccw-virtio-4.2.s390x-latest.args | 1 +
.../tpm-emulator-tpm2-enc.x86_64-latest.args | 1 +
.../tpm-emulator-tpm2.x86_64-latest.args | 1 +
.../tpm-emulator.x86_64-latest.args | 1 +
.../tseg-explicit-size.x86_64-latest.args | 1 +
.../vhost-vsock-auto.x86_64-latest.args | 1 +
.../vhost-vsock.x86_64-latest.args | 1 +
...-default-cpu-kvm-pc-4.2.x86_64-latest.args | 1 +
...default-cpu-kvm-q35-4.2.x86_64-latest.args | 1 +
...-default-cpu-tcg-pc-4.2.x86_64-latest.args | 1 +
...default-cpu-tcg-q35-4.2.x86_64-latest.args | 1 +
...efault-cpu-tcg-virt-4.2.aarch64-latest.xml | 3 +
.../os-firmware-bios.x86_64-latest.xml | 3 +
.../os-firmware-efi-secboot.x86_64-latest.xml | 3 +
.../os-firmware-efi.x86_64-latest.xml | 3 +
...fault-cpu-kvm-pseries-2.7.ppc64-latest.xml | 3 +
...fault-cpu-kvm-pseries-3.1.ppc64-latest.xml | 3 +
...fault-cpu-kvm-pseries-4.2.ppc64-latest.xml | 3 +
...fault-cpu-tcg-pseries-2.7.ppc64-latest.xml | 3 +
...fault-cpu-tcg-pseries-3.1.ppc64-latest.xml | 3 +
...fault-cpu-tcg-pseries-4.2.ppc64-latest.xml | 3 +
...lt-cpu-kvm-ccw-virtio-4.2.s390x-latest.xml | 1 +
...lt-cpu-tcg-ccw-virtio-4.2.s390x-latest.xml | 3 +
.../tpm-emulator-tpm2-enc.x86_64-latest.xml | 3 +
.../tpm-emulator-tpm2.x86_64-latest.xml | 3 +
.../tpm-emulator.x86_64-latest.xml | 3 +
.../tpm-passthrough-crb.x86_64-latest.xml | 3 +
.../tpm-passthrough.x86_64-latest.xml | 3 +
...4-default-cpu-kvm-pc-4.2.x86_64-latest.xml | 3 +
...-default-cpu-kvm-q35-4.2.x86_64-latest.xml | 3 +
...4-default-cpu-tcg-pc-4.2.x86_64-latest.xml | 3 +
...-default-cpu-tcg-q35-4.2.x86_64-latest.xml | 3 +
51 files changed, 151 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 7e470c602a..a90a45c517 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4463,6 +4463,64 @@ qemuDomainDefVcpusPostParse(virDomainDefPtr def)
}
+static int
+qemuDomainDefSetDefaultCPU(virDomainDefPtr def,
+ virQEMUCapsPtr qemuCaps)
+{
+ const char *model;
+
+ if (def->cpu &&
+ (def->cpu->mode != VIR_CPU_MODE_CUSTOM ||
+ def->cpu->model))
+ return 0;
+
+ /* Default CPU model info from QEMU is usable for TCG only except for
+ * x86, s390, and ppc64. */
+ if (!ARCH_IS_X86(def->os.arch) &&
+ !ARCH_IS_S390(def->os.arch) &&
+ !ARCH_IS_PPC64(def->os.arch) &&
+ def->virtType != VIR_DOMAIN_VIRT_QEMU)
+ return 0;
+
+ model = virQEMUCapsGetMachineDefaultCPU(qemuCaps, def->os.machine,
def->virtType);
+ if (!model) {
+ VIR_DEBUG("Unknown default CPU model for domain '%s'",
def->name);
+ return 0;
+ }
+
+ if (STREQ(model, "host") && def->virtType !=
VIR_DOMAIN_VIRT_KVM) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("QEMU reports invalid default CPU model \"host\"
"
+ "for non-kvm domain virt type"));
+ return -1;
+ }
+
+ VIR_DEBUG("Setting default CPU model for domain '%s' to %s",
+ def->name, model);
+
+ if (!def->cpu)
+ def->cpu = g_new0(virCPUDef, 1);
+
+ /* We need to turn off all CPU checks when the domain is started because
+ * the default CPU (e.g., qemu64) may not be runnable on any host. QEMU
+ * will just disable the unavailable features and we will update the CPU
+ * definition accordingly and set check to FULL when starting the domain. */
+ def->cpu->type = VIR_CPU_TYPE_GUEST;
+ def->cpu->check = VIR_CPU_CHECK_NONE;
+
+ if (STREQ(model, "host")) {
+ def->cpu->mode = VIR_CPU_MODE_HOST_PASSTHROUGH;
+ } else {
+ def->cpu->mode = VIR_CPU_MODE_CUSTOM;
+ def->cpu->match = VIR_CPU_MATCH_EXACT;
+ def->cpu->fallback = VIR_CPU_FALLBACK_FORBID;
+ def->cpu->model = g_strdup(model);
+ }
+
+ return 0;
+}
+
+
static int
qemuDomainDefCPUPostParse(virDomainDefPtr def)
{
@@ -4637,6 +4695,9 @@ qemuDomainDefPostParse(virDomainDefPtr def,
if (qemuCanonicalizeMachine(def, qemuCaps) < 0)
return -1;
+ if (qemuDomainDefSetDefaultCPU(def, qemuCaps) < 0)
+ return -1;
+
qemuDomainDefEnableDefaultFeatures(def, qemuCaps);
if (qemuDomainRecheckInternalPaths(def, cfg, parseFlags) < 0)
diff --git a/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args
b/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args
index 5ecbe1fdd6..5305c23464 100644
--- a/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args
+++ b/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
-machine virt-4.2,accel=tcg,usb=off,dump-guest-core=off,gic-version=2 \
+-cpu cortex-a15 \
-m 4096 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args
b/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args
index 7ea6d5b4d5..01d3b9d490 100644
--- a/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-i440fx-2.6,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 214 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args
b/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args
index cf711c0a3f..e0d2eb049d 100644
--- a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-1.2,accel=kvm,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 1024 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/disk-cdrom-tray.x86_64-latest.args
b/tests/qemuxml2argvdata/disk-cdrom-tray.x86_64-latest.args
index ad17416851..21542db4c2 100644
--- a/tests/qemuxml2argvdata/disk-cdrom-tray.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cdrom-tray.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-test/master-key.aes \
-machine pc-0.13,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 1024 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/disk-copy_on_read.x86_64-latest.args
b/tests/qemuxml2argvdata/disk-copy_on_read.x86_64-latest.args
index 1f1d37c957..8552f9f00e 100644
--- a/tests/qemuxml2argvdata/disk-copy_on_read.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-copy_on_read.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-test/master-key.aes \
-machine pc-0.13,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 1024 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/disk-detect-zeroes.x86_64-latest.args
b/tests/qemuxml2argvdata/disk-detect-zeroes.x86_64-latest.args
index b48c0f8d43..2a01647e50 100644
--- a/tests/qemuxml2argvdata/disk-detect-zeroes.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-detect-zeroes.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-test/master-key.aes \
-machine pc-0.13,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 1024 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
index 02e2b1e76c..fadd5a6d7e 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-q35-2.11,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 214 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
index a158e8e3d3..4c932a7365 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-q35-2.9,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 214 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args
b/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args
index 7d6108ec24..4391c6eda2 100644
--- a/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-fedora/master-key.aes \
-machine pc-q35-4.0,accel=kvm,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-bios /usr/share/seabios/bios-256k.bin \
-m 8 \
-overcommit mem-lock=off \
diff --git a/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
b/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
index d8f356ea07..4de135beb8 100644
--- a/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-fedora/master-key.aes \
-machine pc-q35-4.0,accel=kvm,usb=off,smm=on,dump-guest-core=off \
+-cpu qemu64 \
-global driver=cfi.pflash01,property=secure,value=on \
-drive file=/usr/share/OVMF/OVMF_CODE.secboot.fd,if=pflash,format=raw,unit=0,\
readonly=on \
diff --git a/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
b/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
index e4dda734b0..7eba20e443 100644
--- a/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-fedora/master-key.aes \
-machine pc-q35-4.0,accel=kvm,usb=off,smm=on,dump-guest-core=off \
+-cpu qemu64 \
-drive file=/usr/share/OVMF/OVMF_CODE.secboot.fd,if=pflash,format=raw,unit=0,\
readonly=on \
-drive file=/var/lib/libvirt/qemu/nvram/fedora_VARS.fd,if=pflash,format=raw,\
diff --git a/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.args
b/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.args
index d264659d49..e177d06c8b 100644
--- a/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.args
+++ b/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
-machine pseries-2.7,accel=kvm,usb=off,dump-guest-core=off \
+-cpu POWER8 \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.args
b/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.args
index 88f3b4ba26..61f39f27fd 100644
--- a/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.args
+++ b/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
-machine pseries-3.1,accel=kvm,usb=off,dump-guest-core=off \
+-cpu POWER8 \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.args
b/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.args
index ea27f424cb..e591db0d8c 100644
--- a/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.args
+++ b/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
-machine pseries-4.2,accel=kvm,usb=off,dump-guest-core=off \
+-cpu POWER8 \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-2.7.ppc64-latest.args
b/tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-2.7.ppc64-latest.args
index c97fa531ae..06946dcbd9 100644
--- a/tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-2.7.ppc64-latest.args
+++ b/tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-2.7.ppc64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
-machine pseries-2.7,accel=tcg,usb=off,dump-guest-core=off \
+-cpu POWER7 \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-3.1.ppc64-latest.args
b/tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-3.1.ppc64-latest.args
index fbad53b0fb..6090a1bbad 100644
--- a/tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-3.1.ppc64-latest.args
+++ b/tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-3.1.ppc64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
-machine pseries-3.1,accel=tcg,usb=off,dump-guest-core=off \
+-cpu POWER8 \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-4.2.ppc64-latest.args
b/tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-4.2.ppc64-latest.args
index 4222d4d4aa..7804a7b220 100644
--- a/tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-4.2.ppc64-latest.args
+++ b/tests/qemuxml2argvdata/ppc64-default-cpu-tcg-pseries-4.2.ppc64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
-machine pseries-4.2,accel=tcg,usb=off,dump-guest-core=off \
+-cpu POWER9 \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.args
b/tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.args
index d45a87e6ec..4b7345630b 100644
--- a/tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-test/master-key.aes \
-machine s390-ccw-virtio-4.2,accel=kvm,usb=off,dump-guest-core=off \
+-cpu host \
-m 256 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.args
b/tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.args
index 3d31148613..c7bd0c3840 100644
--- a/tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-test/master-key.aes \
-machine s390-ccw-virtio-4.2,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu \
-m 256 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/tpm-emulator-tpm2-enc.x86_64-latest.args
b/tests/qemuxml2argvdata/tpm-emulator-tpm2-enc.x86_64-latest.args
index 3c8dc8e483..2455e14cfe 100644
--- a/tests/qemuxml2argvdata/tpm-emulator-tpm2-enc.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/tpm-emulator-tpm2-enc.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-TPM-VM/master-key.aes \
-machine pc-i440fx-2.12,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 2048 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/tpm-emulator-tpm2.x86_64-latest.args
b/tests/qemuxml2argvdata/tpm-emulator-tpm2.x86_64-latest.args
index 3c8dc8e483..2455e14cfe 100644
--- a/tests/qemuxml2argvdata/tpm-emulator-tpm2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/tpm-emulator-tpm2.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-TPM-VM/master-key.aes \
-machine pc-i440fx-2.12,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 2048 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/tpm-emulator.x86_64-latest.args
b/tests/qemuxml2argvdata/tpm-emulator.x86_64-latest.args
index 3c8dc8e483..2455e14cfe 100644
--- a/tests/qemuxml2argvdata/tpm-emulator.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/tpm-emulator.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-TPM-VM/master-key.aes \
-machine pc-i440fx-2.12,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 2048 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
b/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
index 2fece310e7..53dab283cc 100644
--- a/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
@@ -14,6 +14,7 @@ QEMU_AUDIO_DRV=none \
file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
-machine pc-q35-2.10,accel=tcg,usb=off,smm=on,dump-guest-core=off \
-global mch.extended-tseg-mbytes=48 \
+-cpu qemu64 \
-m 214 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/vhost-vsock-auto.x86_64-latest.args
b/tests/qemuxml2argvdata/vhost-vsock-auto.x86_64-latest.args
index b5d3ff2204..e083b872c5 100644
--- a/tests/qemuxml2argvdata/vhost-vsock-auto.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/vhost-vsock-auto.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-test/master-key.aes \
-machine pc-i440fx-2.9,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 1024 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/vhost-vsock.x86_64-latest.args
b/tests/qemuxml2argvdata/vhost-vsock.x86_64-latest.args
index 76df9d2d4d..1b0ffee6e8 100644
--- a/tests/qemuxml2argvdata/vhost-vsock.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/vhost-vsock.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-test/master-key.aes \
-machine pc-0.13,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 1024 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args
b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args
index c7bef11f22..7a335bc0c4 100644
--- a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
-machine pc-i440fx-4.2,accel=kvm,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args
b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args
index c65d29fc32..88a634fc68 100644
--- a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
-machine pc-q35-4.2,accel=kvm,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.args
b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.args
index 1c233243ad..5f11a07a19 100644
--- a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
-machine pc-i440fx-4.2,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args
b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args
index 505eeb44b3..1c9330f720 100644
--- a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args
@@ -13,6 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
-machine pc-q35-4.2,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
diff --git a/tests/qemuxml2xmloutdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.xml
b/tests/qemuxml2xmloutdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.xml
index 1f4104857a..c0aa2f39ee 100644
--- a/tests/qemuxml2xmloutdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.xml
+++ b/tests/qemuxml2xmloutdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.xml
@@ -11,6 +11,9 @@
<features>
<gic version='2'/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>cortex-a15</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/os-firmware-bios.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/os-firmware-bios.x86_64-latest.xml
index 63886666dd..60d3498765 100644
--- a/tests/qemuxml2xmloutdata/os-firmware-bios.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/os-firmware-bios.x86_64-latest.xml
@@ -16,6 +16,9 @@
<apic/>
<pae/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/os-firmware-efi-secboot.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/os-firmware-efi-secboot.x86_64-latest.xml
index a285e06334..938da73711 100644
--- a/tests/qemuxml2xmloutdata/os-firmware-efi-secboot.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/os-firmware-efi-secboot.x86_64-latest.xml
@@ -16,6 +16,9 @@
<apic/>
<pae/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/os-firmware-efi.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/os-firmware-efi.x86_64-latest.xml
index 46a7b1b780..97ce8a75c7 100644
--- a/tests/qemuxml2xmloutdata/os-firmware-efi.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/os-firmware-efi.x86_64-latest.xml
@@ -16,6 +16,9 @@
<apic/>
<pae/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.xml
b/tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.xml
index d0bff449c1..246462c719 100644
--- a/tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.xml
+++ b/tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries-2.7'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER8</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.xml
b/tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.xml
index add48334e7..392c075073 100644
--- a/tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.xml
+++ b/tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries-3.1'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER8</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.xml
b/tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.xml
index 9c02766b71..2306dcd7f0 100644
--- a/tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.xml
+++ b/tests/qemuxml2xmloutdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries-4.2'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER8</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-2.7.ppc64-latest.xml
b/tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-2.7.ppc64-latest.xml
index fc1714a17e..e76766ff5a 100644
--- a/tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-2.7.ppc64-latest.xml
+++ b/tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-2.7.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries-2.7'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER7</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-3.1.ppc64-latest.xml
b/tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-3.1.ppc64-latest.xml
index f40f3be155..c1d619a9cb 100644
--- a/tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-3.1.ppc64-latest.xml
+++ b/tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-3.1.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries-3.1'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER8</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-4.2.ppc64-latest.xml
b/tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-4.2.ppc64-latest.xml
index 9582223550..311a7ad9da 100644
--- a/tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-4.2.ppc64-latest.xml
+++ b/tests/qemuxml2xmloutdata/ppc64-default-cpu-tcg-pseries-4.2.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries-4.2'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.xml
b/tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.xml
index b35de63ab3..eec5051934 100644
--- a/tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.xml
@@ -8,6 +8,7 @@
<type arch='s390x'
machine='s390-ccw-virtio-4.2'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='host-passthrough' check='none'/>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.xml
b/tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.xml
index 55149d4a78..8ccd460d01 100644
--- a/tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x'
machine='s390-ccw-virtio-4.2'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-enc.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-enc.x86_64-latest.xml
index dcd504310f..8a842e4d22 100644
--- a/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-enc.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-enc.x86_64-latest.xml
@@ -12,6 +12,9 @@
<features>
<acpi/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/tpm-emulator-tpm2.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2.x86_64-latest.xml
index 625aaa5f60..9143a1dde1 100644
--- a/tests/qemuxml2xmloutdata/tpm-emulator-tpm2.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2.x86_64-latest.xml
@@ -12,6 +12,9 @@
<features>
<acpi/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/tpm-emulator.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/tpm-emulator.x86_64-latest.xml
index 002af76c21..ff4006b2e3 100644
--- a/tests/qemuxml2xmloutdata/tpm-emulator.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/tpm-emulator.x86_64-latest.xml
@@ -12,6 +12,9 @@
<features>
<acpi/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/tpm-passthrough-crb.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/tpm-passthrough-crb.x86_64-latest.xml
index ef68c2d0d7..b8be67acfd 100644
--- a/tests/qemuxml2xmloutdata/tpm-passthrough-crb.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/tpm-passthrough-crb.x86_64-latest.xml
@@ -12,6 +12,9 @@
<features>
<acpi/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/tpm-passthrough.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/tpm-passthrough.x86_64-latest.xml
index 2a99f35cf8..669992bcf6 100644
--- a/tests/qemuxml2xmloutdata/tpm-passthrough.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/tpm-passthrough.x86_64-latest.xml
@@ -12,6 +12,9 @@
<features>
<acpi/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.xml
index 1f24dee8e7..c7b0f11cf8 100644
--- a/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.xml
@@ -12,6 +12,9 @@
<acpi/>
<apic/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml
index 39a7013b67..be211acd29 100644
--- a/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml
@@ -12,6 +12,9 @@
<acpi/>
<apic/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.xml
index b45ad4c051..159270b83a 100644
--- a/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-pc-4.2.x86_64-latest.xml
@@ -12,6 +12,9 @@
<acpi/>
<apic/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml
b/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml
index c6a85977e9..b95e146c81 100644
--- a/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml
@@ -12,6 +12,9 @@
<acpi/>
<apic/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
--
2.23.0