[PATCH v3 38/57] KVM: x86: Advertise HYPERVISOR in KVM_GET_SUPPORTED_CPUID

From: Sean Christopherson
Date: Wed Nov 27 2024 - 20:44:43 EST


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@xxxxxxxxxx>
Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
arch/x86/kvm/cpuid.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 51792cf48cd7..a13bf0ab417d 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -722,7 +722,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,
--
2.47.0.338.g60cca15819-goog