aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Mattson <jmattson@google.com>2019-09-24 16:51:08 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2019-09-26 07:20:54 -0400
commit40bc47b08b6efc8b64fef77cb46974f634215425 (patch)
tree315d605ebd660099b6026e2b647f8fe7c4f415f1
parent5f41a37b151f6459e0b650a2f4d1d59b6c02d1ab (diff)
kvm: x86: Enumerate support for CLZERO instruction
CLZERO is available to the guest if it is supported on the host. Therefore, enumerate support for the instruction in KVM_GET_SUPPORTED_CPUID whenever it is supported on the host. Signed-off-by: Jim Mattson <jmattson@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--arch/x86/kvm/cpuid.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index ce4a1b3cc3e8..34d9f9f481a3 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -485,8 +485,9 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
485 485
486 /* cpuid 0x80000008.ebx */ 486 /* cpuid 0x80000008.ebx */
487 const u32 kvm_cpuid_8000_0008_ebx_x86_features = 487 const u32 kvm_cpuid_8000_0008_ebx_x86_features =
488 F(WBNOINVD) | F(AMD_IBPB) | F(AMD_IBRS) | F(AMD_SSBD) | F(VIRT_SSBD) | 488 F(CLZERO) | F(WBNOINVD) | F(AMD_IBPB) | F(AMD_IBRS) |
489 F(AMD_SSB_NO) | F(AMD_STIBP) | F(AMD_STIBP_ALWAYS_ON); 489 F(AMD_STIBP) | F(AMD_STIBP_ALWAYS_ON) | F(AMD_SSBD) |
490 F(VIRT_SSBD) | F(AMD_SSB_NO);
490 491
491 /* cpuid 0xC0000001.edx */ 492 /* cpuid 0xC0000001.edx */
492 const u32 kvm_cpuid_C000_0001_edx_x86_features = 493 const u32 kvm_cpuid_C000_0001_edx_x86_features =