]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Use more data for comparing CPUs
authorJiri Denemark <jdenemar@redhat.com>
Tue, 11 Apr 2017 18:46:05 +0000 (20:46 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 19 Apr 2017 14:36:38 +0000 (16:36 +0200)
commit5b4a6adb5ca24a6cb91cdc55c31506fb278d3a91
tree07447af81941f622bfd682c5f12ae44325da1b07
parentbf1a881715c905c67f7d38dcd5bd6c2afbff1f9b
qemu: Use more data for comparing CPUs

With QEMU older than 2.9.0 libvirt uses CPUID instruction to determine
what CPU features are supported on the host. This was later used when
checking compatibility of guest CPUs. Since QEMU 2.9.0 we ask QEMU for
the host CPU data. But the two methods we use usually provide disjoint
sets of CPU features because QEMU/KVM does not support all features
provided by the host CPU and on the other hand it can enable some
feature even if the host CPU does not support them.

So if there is a domain which requires a CPU features disabled by
QEMU/KVM, libvirt will refuse to start it with QEMU > 2.9.0 as its guest
CPU is incompatible with the host CPU data we got from QEMU. But such
domain would happily start on older QEMU (of course, the features would
be missing the guest CPU). To fix this regression, we need to combine
both CPU feature sets when checking guest CPU compatibility.

https://bugzilla.redhat.com/show_bug.cgi?id=1439933

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
src/qemu/qemu_process.c