• Paolo Bonzini's avatar
    x86, kvm: correctly access the KVM_CPUID_FEATURES leaf at 0x40000101 · 77f01bdf
    Paolo Bonzini authored
    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: 1085ba7f
    Cc: stable@vger.kernel.org
    Cc: mtosatti@redhat.com
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    77f01bdf
kvm.c 18.4 KB