diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 90de31ac89b60a2abb18ce1da864faf0f20c6277..d56dfa9f00964c570755fa013e312ab8e857f9ff 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4429,6 +4429,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) { @@ -4639,6 +4697,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 5ecbe1fdd623a41bca92b8f439bc9b394121255a..5305c234647cf738507ad4662eaf198e57bb477e 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 7ea6d5b4d54f909771f6f468a5533ee3e0de194b..01d3b9d4909a85d67530171538d34e8e2e4cdc63 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 cf711c0a3f73eab0d1f57ba9ccdf66496538d283..e0d2eb049d13982e83bb1a2105c98bb47445bb30 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 ad17416851634570ae6f18c2af51d3c3c1037cd5..21542db4c2d6be5e089b4e6882e8e38ba8d6e545 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 1f1d37c95720f00fb379823ee03ede6baf86de52..8552f9f00e648da74822b4e3a29cd83eca1badac 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 b48c0f8d43c17644c67ae662967dc465e0c531c4..2a01647e50ecb2bd459e9411a57de5cfc497144d 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 02e2b1e76cfb2304faa691684d35075f14a10768..fadd5a6d7e05050ca7dcd05e58b3552edd9af243 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 a158e8e3d311cc1c178a8b8dea440575904dadcd..4c932a7365b6ac2fb83d1f7fc95f3a51d531e758 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 7d6108ec244fb8ed234d0cda5f7939375ef188fd..4391c6eda27ea3e8652ce405bc8853f6bf484e3c 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 d8f356ea07e1bd83fc2689b5fc15a6540ffef59c..4de135beb8c699f92e307e3d2b14e5c559e71d15 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 e4dda734b0eaef57bdb84a86ea1b167c35f9bf36..7eba20e443ac34eedd65152816702228fa4951db 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 d264659d49bab6bc34e5e0105f6c9f2d6e7cd9f0..e177d06c8b0c12912cef311ffaddca422ad5491f 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 88f3b4ba26700f570e5a16d56a5267f56fc33703..61f39f27fd804ae688e8fa3d32e032d781e438fb 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 ea27f424cb25f5c837cde267b8e6300eded74cc0..e591db0d8c6a400badb1dd9d4ba985865ce71a19 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 c97fa531aeccf43636f17d41bc011d64bca882cc..06946dcbd9ef6fa413b3c2b2462396aa92650538 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 fbad53b0fb994a9e12d732c98ef8e619f8a4c79f..6090a1bbad46b60a2cf3e1e258d8de85d95f13fd 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 4222d4d4aae4064d41b49746c29366c65f7eb15a..7804a7b22067602333b362e4d1a73d52f9df44fa 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 d45a87e6ec561f102116d8c2ec34410bd7a3947c..4b7345630b419a8e502f506178fffa319f289919 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 3d3114861312f8264a1616e9454e34b776d6d7dc..c7bd0c3840368812baf1615e874fb91b73d930fd 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 3c8dc8e483d4a6e6bb675ae2d40e06f3c09a4bd7..2455e14cfe80c671558ef6f38e1ebe882ca38b2b 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 3c8dc8e483d4a6e6bb675ae2d40e06f3c09a4bd7..2455e14cfe80c671558ef6f38e1ebe882ca38b2b 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 3c8dc8e483d4a6e6bb675ae2d40e06f3c09a4bd7..2455e14cfe80c671558ef6f38e1ebe882ca38b2b 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 2fece310e796cd6d119112732eb921c81cefa48b..53dab283ccb20f683f0f2a35cd794f83a4d8de13 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 b5d3ff220460ef7d6a6cc67b54910d2940d003b6..e083b872c588e240c8ee01063a1b5b4cac06c381 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 76df9d2d4dc81407fa55cad0fe3d169908cc885d..1b0ffee6e8813954b39da0721936a6dfbc7523c3 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 c7bef11f22abfc3ab80102b7113a41e96cb824d3..7a335bc0c47a9d526fd8209064af766ef39b093f 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 c65d29fc32ad292cd6542f02a26196214a845fa5..88a634fc6898f7ecdf1077d6dada6e64515f2214 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 1c233243ad9f6570b40d0b91ba4a3a2806a3fc07..5f11a07a197ccc145b03a834cdf68bce37d97599 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 505eeb44b3fa50d6064f34e030f3ea070b274eb5..1c9330f720520b0da96c4dcf8a5cd843d621b76d 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 1f4104857a8bb9d512c73d9154237b0243798aa3..c0aa2f39ee2537dd5c725b89b6e459c354014fb8 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 @@ + + cortex-a15 + destroy restart diff --git a/tests/qemuxml2xmloutdata/os-firmware-bios.x86_64-latest.xml b/tests/qemuxml2xmloutdata/os-firmware-bios.x86_64-latest.xml index 63886666dd57ae37d2c33b7daedbc4469429cc8e..60d3498765144a1ef283b6a595efa9b5d11bb3be 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 @@ + + qemu64 + destroy restart 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 a285e063349b492c84cc4661522fdc1693567976..938da737117dd685720e833d498fbd3ea5bba90b 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 @@ + + qemu64 + destroy restart diff --git a/tests/qemuxml2xmloutdata/os-firmware-efi.x86_64-latest.xml b/tests/qemuxml2xmloutdata/os-firmware-efi.x86_64-latest.xml index 46a7b1b780c52d60bccc19f286d42f18aef65f78..97ce8a75c7c9c6c66f5aae5ddc8b2c0d8d26065d 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 @@ + + qemu64 + destroy restart 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 d0bff449c1f9ab148d0b62331dbdb9e0d228d93c..246462c7196adbe6ab04cac5cb6a52e92ce46b04 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 @@ hvm + + POWER8 + destroy restart 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 add48334e7ed685842e0d4b5d4effe178a5abd3b..392c07507303192367598d0c77304cb774ff8dbd 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 @@ hvm + + POWER8 + destroy restart 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 9c02766b7195f11aae582431dcc78018e02cfbc2..2306dcd7f0d8b848645f6a38b30e737d95b3a738 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 @@ hvm + + POWER8 + destroy restart 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 fc1714a17ea007be0ffa81d7372a386031695025..e76766ff5a51570fb4ff7a20e2e42565bbaca67a 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 @@ hvm + + POWER7 + destroy restart 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 f40f3be15581fb007c00fff8ef0a9fbdd45f5071..c1d619a9cb30a8c7b60fd79ef74abafdf9affc5a 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 @@ hvm + + POWER8 + destroy restart 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 9582223550d8d36166377d2c7286a771a5925da6..311a7ad9da2c737d5e594f40185b989099b3a46f 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 @@ hvm + + POWER9 + destroy restart 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 b35de63ab3831093e8e51467a11fb01ac7c4802d..eec5051934c0bce632f22e2b8eff9ce8edae92bd 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 @@ hvm + destroy restart 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 55149d4a785181ed6df47fe1a39f42828b92120f..8ccd460d0155ff05bc4693809e7b666633b4ce50 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 @@ hvm + + qemu + destroy restart 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 dcd504310f553f461e83614ae078a5fe05f0443d..8a842e4d225ce7c3e7a5b6628be35c21d8a9354d 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 @@ + + qemu64 + destroy restart diff --git a/tests/qemuxml2xmloutdata/tpm-emulator-tpm2.x86_64-latest.xml b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2.x86_64-latest.xml index 625aaa5f60a266f8f0730bc80b4edf83614cfe5f..9143a1dde1116f6af7d2ba108b6d29bc38484c16 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 @@ + + qemu64 + destroy restart diff --git a/tests/qemuxml2xmloutdata/tpm-emulator.x86_64-latest.xml b/tests/qemuxml2xmloutdata/tpm-emulator.x86_64-latest.xml index 002af76c2104dab513b5e677b9ddeef1a2e7ac7b..ff4006b2e335c3eef7b29748dfb64f8fd21e00ca 100644 --- a/tests/qemuxml2xmloutdata/tpm-emulator.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/tpm-emulator.x86_64-latest.xml @@ -12,6 +12,9 @@ + + qemu64 + destroy restart diff --git a/tests/qemuxml2xmloutdata/tpm-passthrough-crb.x86_64-latest.xml b/tests/qemuxml2xmloutdata/tpm-passthrough-crb.x86_64-latest.xml index ef68c2d0d7f63709b5a9d43709e31cccf0e66c3b..b8be67acfd95782d24524bc582ce9ab757f5fb25 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 @@ + + qemu64 + destroy restart diff --git a/tests/qemuxml2xmloutdata/tpm-passthrough.x86_64-latest.xml b/tests/qemuxml2xmloutdata/tpm-passthrough.x86_64-latest.xml index 2a99f35cf87d32f011095b55cc95acf1c58452cb..669992bcf66e4171ca8ec83b45c121934df01dde 100644 --- a/tests/qemuxml2xmloutdata/tpm-passthrough.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/tpm-passthrough.x86_64-latest.xml @@ -12,6 +12,9 @@ + + qemu64 + destroy restart 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 1f24dee8e7bed2e016330778b485d3a045a8e76b..c7b0f11cf819bc4027275c3e7e6da12972c89a72 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 @@ + + qemu64 + destroy restart 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 39a7013b67198356d201ebdd4afcacac47f3f3bf..be211acd29bf92218140456c49ccde9ebbdff508 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 @@ + + qemu64 + destroy restart 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 b45ad4c051be074e4c6e609e6f10856f0e95997c..159270b83add9931de6d7628cadc79fb97a4a705 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 @@ + + qemu64 + destroy restart 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 c6a85977e9f64035b1e1cbb93e47ac4b60c73e64..b95e146c81d4e43b8a5b2aa8a67091517750f8f6 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 @@ + + qemu64 + destroy restart