Skip to content

Commit 40bc47b

Browse files
jsmattsonjrbonzini
authored andcommitted
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 <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 5f41a37 commit 40bc47b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/x86/kvm/cpuid.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,9 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,
485485

486486
/* cpuid 0x80000008.ebx */
487487
const u32 kvm_cpuid_8000_0008_ebx_x86_features =
488-
F(WBNOINVD) | F(AMD_IBPB) | F(AMD_IBRS) | F(AMD_SSBD) | F(VIRT_SSBD) |
489-
F(AMD_SSB_NO) | F(AMD_STIBP) | F(AMD_STIBP_ALWAYS_ON);
488+
F(CLZERO) | F(WBNOINVD) | F(AMD_IBPB) | F(AMD_IBRS) |
489+
F(AMD_STIBP) | F(AMD_STIBP_ALWAYS_ON) | F(AMD_SSBD) |
490+
F(VIRT_SSBD) | F(AMD_SSB_NO);
490491

491492
/* cpuid 0xC0000001.edx */
492493
const u32 kvm_cpuid_C000_0001_edx_x86_features =

0 commit comments

Comments
 (0)