]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Don't compare CPU against host for TCG
authorCole Robinson <crobinso@redhat.com>
Tue, 23 Sep 2014 17:07:09 +0000 (13:07 -0400)
committerCole Robinson <crobinso@redhat.com>
Thu, 30 Oct 2014 14:15:53 +0000 (10:15 -0400)
commite9bf19a4b26ed820e6c9950c9dc714010ad85fb4
tree22be2eca66f9d25cababa6dc27e9cce8d365bddd
parent74e27d1c0e260e5c9ae85944025b9d9f2d8e7555
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.

(cherry picked from commit cf7fce8f2fd1c930f357fd4ff93ac35f38eb30c6)
25 files changed:
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.args
tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-default-nic.xml
tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.args
tests/qemuxml2argvdata/qemuxml2argv-aarch64-virt-virtio.xml
tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.args
tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml
tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.args
tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2-nofallback.xml
tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.args
tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml
tests/qemuxml2argvdata/qemuxml2argv-cpu-fallback.args
tests/qemuxml2argvdata/qemuxml2argv-cpu-fallback.xml
tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.args
tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml
tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.args
tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml
tests/qemuxml2argvdata/qemuxml2argv-cpu-nofallback.xml
tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.args
tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml
tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args
tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.xml
tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-exact.args
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml