]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Fix hyperv features with QEMU 4.1
authorJiri Denemark <jdenemar@redhat.com>
Thu, 25 Jul 2019 11:50:57 +0000 (13:50 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 29 Jul 2019 13:41:50 +0000 (15:41 +0200)
commit0ccdd476bb329f1486438b896255e5c44a91ff4a
treeb7f5cc3ae9f77a885dbaffa4ebf868bacc4cb112
parent7efe930ec3c81feefeea8ec9b7ad9c8a55f8f53d
qemu: Fix hyperv features with QEMU 4.1

Originally the names of the hyperv CPU features were only used
internally for looking up their CPUID bits. So we used "__kvm_hv_"
prefix for them to make sure the names do not collide with normal CPU
features stored in our CPU map.

But with QEMU 4.1 we check which features were enabled or disabled by a
freshly started QEMU process using their names rather than their CPUID
bits (mostly because of MSR features). Thus we need to change our made
up internal names into the actual names used by QEMU. Most of the names
are only used with QEMU 4.1 and newer and the reset was introduced with
QEMU recently enough to already support spelling with "-". Thus we don't
need to define them as "hv_*" with a translation to "hv-*" for new QEMU.

Without this patch libvirt would mistakenly report all hyperv features
as unavailable and refuse to start any domain using them with QEMU 4.1.

Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/cpu/cpu_x86_data.h
src/qemu/qemu_process.c