From 445a09bdc96ca6e434bfdcca75752ee316289bbe Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 23 Sep 2014 13:07:09 -0400 Subject: [PATCH] qemu: Don't compare CPU against host for TCG Right now when building the qemu command line, we try to do various unconditional validations of the guest CPU against the host CPU. However this checks are overly applied. The only time we should use the checks are: - The user requests host-model/host-passthrough, or - When KVM is requsted. CPU features requested in TCG mode are always emulated by qemu and are independent of the host CPU, so no host CPU checks should be performed. Right now if trying to specify a CPU for arm on an x86 host, it attempts to do non-sensical validation and falls over. Switch all the test cases that were intending to test CPU validation to use KVM, so they continue to test the intended code. Amend some aarch64 XML tests with a CPU model, to ensure things work correctly. --- src/qemu/qemu_command.c | 68 +++++++++++-------- ...qemuxml2argv-aarch64-virt-default-nic.args | 3 +- .../qemuxml2argv-aarch64-virt-default-nic.xml | 3 + .../qemuxml2argv-aarch64-virt-virtio.args | 3 +- .../qemuxml2argv-aarch64-virt-virtio.xml | 3 + .../qemuxml2argv-cpu-exact1.args | 2 +- .../qemuxml2argv-cpu-exact1.xml | 4 +- .../qemuxml2argv-cpu-exact2-nofallback.args | 2 +- .../qemuxml2argv-cpu-exact2-nofallback.xml | 4 +- .../qemuxml2argv-cpu-exact2.args | 2 +- .../qemuxml2argv-cpu-exact2.xml | 4 +- .../qemuxml2argv-cpu-fallback.args | 2 +- .../qemuxml2argv-cpu-fallback.xml | 4 +- .../qemuxml2argv-cpu-minimum1.args | 2 +- .../qemuxml2argv-cpu-minimum1.xml | 4 +- .../qemuxml2argv-cpu-minimum2.args | 2 +- .../qemuxml2argv-cpu-minimum2.xml | 4 +- .../qemuxml2argv-cpu-nofallback.xml | 2 +- .../qemuxml2argv-cpu-strict1.args | 2 +- .../qemuxml2argv-cpu-strict1.xml | 4 +- .../qemuxml2argv-graphics-spice-timeout.args | 2 +- .../qemuxml2argv-graphics-spice-timeout.xml | 4 +- .../qemuxml2argv-pseries-cpu-exact.args | 4 +- tests/qemuxml2argvtest.c | 21 +++--- .../qemuxml2xmlout-graphics-spice-timeout.xml | 4 +- 25 files changed, 90 insertions(+), 69 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index db5ea35be..cd3444574 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6160,6 +6160,8 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver, virCPUCompareResult cmp; const char *preferred; virCapsPtr caps = NULL; + bool compareAgainstHost = (def->virtType == VIR_DOMAIN_VIRT_KVM || + def->cpu->mode != VIR_CPU_MODE_CUSTOM); if (!(caps = virQEMUDriverGetCapabilities(driver, false))) goto cleanup; @@ -6182,30 +6184,33 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver, cpuUpdate(cpu, host) < 0) goto cleanup; - cmp = cpuGuestData(host, cpu, &data, &compare_msg); - switch (cmp) { - case VIR_CPU_COMPARE_INCOMPATIBLE: - if (compare_msg) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("guest and host CPU are not compatible: %s"), - compare_msg); - } else { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("guest CPU is not compatible with host CPU")); - } - /* fall through */ - case VIR_CPU_COMPARE_ERROR: - goto cleanup; + /* For non-KVM, CPU features are emulated, so host compat doesn't matter */ + if (compareAgainstHost) { + cmp = cpuGuestData(host, cpu, &data, &compare_msg); + switch (cmp) { + case VIR_CPU_COMPARE_INCOMPATIBLE: + if (compare_msg) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("guest and host CPU are not compatible: %s"), + compare_msg); + } else { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("guest CPU is not compatible with host CPU")); + } + /* fall through */ + case VIR_CPU_COMPARE_ERROR: + goto cleanup; - default: - break; + default: + break; + } } /* Only 'svm' requires --enable-nesting. The nested * 'vmx' patches now simply hook off the CPU features */ - if (def->os.arch == VIR_ARCH_X86_64 || - def->os.arch == VIR_ARCH_I686) { + if ((def->os.arch == VIR_ARCH_X86_64 || def->os.arch == VIR_ARCH_I686) && + compareAgainstHost) { int hasSVM = cpuHasFeature(data, "svm"); if (hasSVM < 0) goto cleanup; @@ -6233,16 +6238,23 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver, if (VIR_STRDUP(guest->vendor_id, cpu->vendor_id) < 0) goto cleanup; - guest->arch = host->arch; - if (cpu->match == VIR_CPU_MATCH_MINIMUM) - preferred = host->model; - else - preferred = cpu->model; + if (compareAgainstHost) { + guest->arch = host->arch; + if (cpu->match == VIR_CPU_MATCH_MINIMUM) + preferred = host->model; + else + preferred = cpu->model; - guest->type = VIR_CPU_TYPE_GUEST; - guest->fallback = cpu->fallback; - if (cpuDecode(guest, data, (const char **)cpus, ncpus, preferred) < 0) - goto cleanup; + guest->type = VIR_CPU_TYPE_GUEST; + guest->fallback = cpu->fallback; + if (cpuDecode(guest, data, + (const char **)cpus, ncpus, preferred) < 0) + goto cleanup; + } else { + guest->arch = def->os.arch; + if (VIR_STRDUP(guest->model, cpu->model) < 0) + goto cleanup; + } virBufferAdd(buf, guest->model, -1); if (guest->vendor_id) @@ -6259,7 +6271,7 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver, } ret = 0; -cleanup: + cleanup: virObjectUnref(caps); VIR_FREE(compare_msg); cpuDataFree(data); diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args index d4d403b77..8cb57c5c8 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args @@ -1,5 +1,6 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-aarch64 -S -M virt -m 1024 -smp 1 -nographic \ +/usr/bin/qemu-system-aarch64 -S -M virt -cpu cortex-a53 \ +-m 1024 -smp 1 -nographic \ -nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \ -boot c -kernel /aarch64.kernel -initrd /aarch64.initrd -append console=ttyAMA0 \ -usb -device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.xml index 868de9497..3a6f098d0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.xml @@ -7,6 +7,9 @@ + + cortex-a53 + hvm /aarch64.kernel diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args index afd6e41a5..05f362980 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args @@ -1,5 +1,6 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-aarch64 -S -M virt -m 1024 -smp 1 -nographic \ +/usr/bin/qemu-system-aarch64 -S -M virt -cpu cortex-a53 \ +-m 1024 -smp 1 -nographic \ -nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \ -boot c -kernel /aarch64.kernel -initrd /aarch64.initrd -append \ 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.xml index 184b62cd4..ad3461512 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.xml @@ -16,6 +16,9 @@ + + cortex-a53 + destroy restart diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.args index 76c2c4843..0a5861635 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.args @@ -1,5 +1,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc \ +/usr/bin/qemu-kvm -S -M pc \ -cpu qemu64,-svm,-lm,-nx,-syscall,-clflush,-pse36,-mca -m 214 -smp 6 \ -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot n -usb -net \ none -serial none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml index ddd9d5ad3..1d1e81571 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml @@ -1,4 +1,4 @@ - + QEMUGuest1 c7a5fdbd-edaf-9455-926a-d65c16db1809 219100 @@ -23,6 +23,6 @@ restart destroy - /usr/bin/qemu + /usr/bin/qemu-kvm diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.args index 0e3737967..e46527b56 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.args @@ -1,5 +1,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc \ +/usr/bin/qemu-kvm -S -M pc \ -cpu core2duo,+lahf_lm,+3dnowext,+xtpr,+ds_cpl,+tm,+ht,+ds,-nx -m 214 -smp 6 \ -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot n -usb -net \ none -serial none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.xml index de4c8d2ff..6b9b7d4c6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.xml @@ -1,4 +1,4 @@ - + QEMUGuest1 c7a5fdbd-edaf-9455-926a-d65c16db1809 219100 @@ -30,6 +30,6 @@ restart destroy - /usr/bin/qemu + /usr/bin/qemu-kvm diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.args index 0e3737967..e46527b56 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.args @@ -1,5 +1,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc \ +/usr/bin/qemu-kvm -S -M pc \ -cpu core2duo,+lahf_lm,+3dnowext,+xtpr,+ds_cpl,+tm,+ht,+ds,-nx -m 214 -smp 6 \ -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot n -usb -net \ none -serial none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml index e027e6fcd..eaea564f6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml @@ -1,4 +1,4 @@ - + QEMUGuest1 c7a5fdbd-edaf-9455-926a-d65c16db1809 219100 @@ -30,6 +30,6 @@ restart destroy - /usr/bin/qemu + /usr/bin/qemu-kvm diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-fallback.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-fallback.args index 4ee839184..ead561f44 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-fallback.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-fallback.args @@ -3,7 +3,7 @@ PATH=/bin \ HOME=/home/test \ USER=test \ LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu \ +/usr/bin/qemu-kvm \ -S \ -M pc \ -cpu Penryn,-sse4.1 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-fallback.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-fallback.xml index 6125f41f6..85642e9a9 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-fallback.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-fallback.xml @@ -1,4 +1,4 @@ - + QEMUGuest1 c7a5fdbd-edaf-9455-926a-d65c16db1809 219100 @@ -20,6 +20,6 @@ restart destroy - /usr/bin/qemu + /usr/bin/qemu-kvm diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.args index 0630ef46b..d8207e73c 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.args @@ -1,5 +1,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc \ +/usr/bin/qemu-kvm -S -M pc \ -cpu core2duo,+lahf_lm,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,+pbe,+tm,+ht,+ss,\ +acpi,+ds -m 214 -smp 6 -nographic -monitor unix:/tmp/test-monitor,server,\ nowait -no-acpi -boot n -usb -net none -serial none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml index 4ba5d0b14..5879d3547 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml @@ -1,4 +1,4 @@ - + QEMUGuest1 c7a5fdbd-edaf-9455-926a-d65c16db1809 219100 @@ -16,6 +16,6 @@ restart destroy - /usr/bin/qemu + /usr/bin/qemu-kvm diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.args index 830994f72..17ba2568f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.args @@ -1,5 +1,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc \ +/usr/bin/qemu-kvm -S -M pc \ -cpu core2duo,+lahf_lm,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,+pbe,+tm,+ht,+ss,\ +acpi,+ds,-lm,-nx,-syscall -m 214 -smp 6 -nographic -monitor \ unix:/tmp/test-monitor,server,nowait -no-acpi -boot n -usb -net none -serial none \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml index c43bf4f80..b8bbf25ac 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml @@ -1,4 +1,4 @@ - + QEMUGuest1 c7a5fdbd-edaf-9455-926a-d65c16db1809 219100 @@ -20,6 +20,6 @@ restart destroy - /usr/bin/qemu + /usr/bin/qemu-kvm diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-nofallback.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-nofallback.xml index 4ae0be8b2..abb0e9c2d 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-nofallback.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-nofallback.xml @@ -1,4 +1,4 @@ - + QEMUGuest1 c7a5fdbd-edaf-9455-926a-d65c16db1809 219100 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.args b/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.args index 8b545a795..c500ef72b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.args @@ -1,5 +1,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ -/usr/bin/qemu -S -M pc \ +/usr/bin/qemu-kvm -S -M pc \ -cpu core2duo,+lahf_lm,+3dnowext,+xtpr,+est,+vmx,+ds_cpl,+tm,+ht,+acpi,+ds,-nx \ -m 214 -smp 6 -nographic -monitor unix:/tmp/test-monitor,server,nowait \ -no-acpi -boot n -usb -net none -serial none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml index 935f46fb9..a9fc9c529 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml @@ -1,4 +1,4 @@ - + QEMUGuest1 c7a5fdbd-edaf-9455-926a-d65c16db1809 219100 @@ -33,6 +33,6 @@ restart destroy - /usr/bin/qemu + /usr/bin/qemu-kvm diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args index 48744b2f3..8b5d9ee25 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args @@ -1,5 +1,5 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \ -/usr/bin/qemu -S -M pc -cpu core2duo,+lahf_lm,+xtpr,+cx16,+tm2,\ +/usr/bin/qemu-kvm -S -M pc -cpu core2duo,+lahf_lm,+xtpr,+cx16,+tm2,\ +est,+vmx,+ds_cpl,+pbe,+tm,+ht,+ss,+acpi,+ds \ -m 1024 -smp 2 -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \ -boot dc -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml index e6ecbed58..3ed864c93 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml @@ -1,4 +1,4 @@ - + f14 553effab-b5e1-2d80-dfe3-da4344826c43 1048576 @@ -38,7 +38,7 @@ restart restart - /usr/bin/qemu + /usr/bin/qemu-kvm diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-exact.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-exact.args index 1e0968068..992729442 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-exact.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-exact.args @@ -1,6 +1,6 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ -/usr/bin/qemu-system-ppc64 -S -M pseries -cpu POWER7_v2.3 -m 512 -smp 1 -nographic \ --nodefconfig -nodefaults \ +QEMU_AUDIO_DRV=none /usr/bin/qemu-system-ppc64 -S -M pseries -cpu POWER7_v2.3 \ +-m 512 -smp 1 -nographic -nodefconfig -nodefaults \ -chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ -mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -usb \ -chardev pty,id=charserial0 \ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index b380fd86c..483ca9032 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -933,7 +933,7 @@ mymain(void) QEMU_CAPS_DEVICE, QEMU_CAPS_SPICE, QEMU_CAPS_DEVICE_QXL); DO_TEST("graphics-spice-timeout", - QEMU_CAPS_DRIVE, + QEMU_CAPS_KVM, QEMU_CAPS_DRIVE, QEMU_CAPS_VGA, QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE, QEMU_CAPS_SPICE, QEMU_CAPS_DEVICE_QXL_VGA); @@ -1208,14 +1208,14 @@ mymain(void) DO_TEST("cpu-topology1", QEMU_CAPS_SMP_TOPOLOGY); DO_TEST("cpu-topology2", QEMU_CAPS_SMP_TOPOLOGY); DO_TEST("cpu-topology3", NONE); - DO_TEST("cpu-minimum1", NONE); - DO_TEST("cpu-minimum2", NONE); - DO_TEST("cpu-exact1", NONE); - DO_TEST("cpu-exact2", NONE); - DO_TEST("cpu-exact2-nofallback", NONE); - DO_TEST("cpu-fallback", NONE); - DO_TEST_FAILURE("cpu-nofallback", NONE); - DO_TEST("cpu-strict1", NONE); + DO_TEST("cpu-minimum1", QEMU_CAPS_KVM); + DO_TEST("cpu-minimum2", QEMU_CAPS_KVM); + DO_TEST("cpu-exact1", QEMU_CAPS_KVM); + DO_TEST("cpu-exact2", QEMU_CAPS_KVM); + DO_TEST("cpu-exact2-nofallback", QEMU_CAPS_KVM); + DO_TEST("cpu-fallback", QEMU_CAPS_KVM); + DO_TEST_FAILURE("cpu-nofallback", QEMU_CAPS_KVM); + DO_TEST("cpu-strict1", QEMU_CAPS_KVM); DO_TEST("cpu-numa1", NONE); DO_TEST("cpu-numa2", QEMU_CAPS_SMP_TOPOLOGY); DO_TEST_PARSE_ERROR("cpu-numa3", NONE); @@ -1303,7 +1303,8 @@ mymain(void) DO_TEST("pseries-usb-kbd", QEMU_CAPS_PCI_OHCI, QEMU_CAPS_DEVICE_USB_KBD, QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); - DO_TEST_FAILURE("pseries-cpu-exact", QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); + DO_TEST("pseries-cpu-exact", QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, + QEMU_CAPS_NODEFCONFIG); DO_TEST("disk-ide-drive-split", QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_IDE_CD); diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml index 44c4cf77f..73ebcab9e 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml @@ -1,4 +1,4 @@ - + f14 553effab-b5e1-2d80-dfe3-da4344826c43 1048576 @@ -38,7 +38,7 @@ restart restart - /usr/bin/qemu + /usr/bin/qemu-kvm -- 2.39.5