x86, kvm: correctly access the KVM_CPUID_FEATURES leaf at 0x40000101
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 27 Jan 2014 13:51:44 +0000 (14:51 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 29 Jan 2014 17:11:55 +0000 (18:11 +0100)
commit77f01bdfa5e55dc19d3eb747181d2730a9bb3ca8
tree9f85c79d2af02145774799b31b0862dfcce5b844
parent1c300a40772dae829b91dad634999a6a522c0829
x86, kvm: correctly access the KVM_CPUID_FEATURES leaf at 0x40000101

When Hyper-V hypervisor leaves are present, KVM must relocate
its own leaves at 0x40000100, because Windows does not look for
Hyper-V leaves at indices other than 0x40000000.  In this case,
the KVM features are at 0x40000101, but the old code would always
look at 0x40000001.

Fix by using kvm_cpuid_base().  This also requires making the
function non-inline, since kvm_cpuid_base() is static.

Fixes: 1085ba7f552d84aa8ac0ae903fa8d0cc2ff9f79d
Cc: stable@vger.kernel.org
Cc: mtosatti@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_para.h
arch/x86/kernel/kvm.c