]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: x86: Advertise HYPERVISOR in KVM_GET_SUPPORTED_CPUID
authorSean Christopherson <seanjc@google.com>
Thu, 28 Nov 2024 01:34:05 +0000 (17:34 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 22:20:02 +0000 (14:20 -0800)
Unconditionally advertise "support" for the HYPERVISOR feature in CPUID,
as the flag simply communicates to the guest that's it's running under a
hypervisor.

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20241128013424.4096668-39-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/cpuid.c

index f0ee773704d5edc1f9cc0a6f0c2c53c6237e592a..202ab3f55f53e38d110ebd8d736f3c0fa7ec76cc 100644 (file)
@@ -743,7 +743,8 @@ void kvm_set_cpu_caps(void)
                0 /* OSXSAVE */ |
                F(AVX) |
                F(F16C) |
-               F(RDRAND)
+               F(RDRAND) |
+               EMULATED_F(HYPERVISOR)
        );
 
        kvm_cpu_cap_init(CPUID_1_EDX,