Skip to content

Commit bbbe171

Browse files
jsmattsonjrsean-jc
authored andcommitted
KVM: x86: Advertise fast REP string features inherent to the CPU
Fast zero-length REP MOVSB, fast short REP STOSB, and fast short REP {CMPSB,SCASB} are inherent features of the processor that cannot be hidden by the hypervisor. When these features are present on the host, enumerate them in KVM_GET_SUPPORTED_CPUID. Signed-off-by: Jim Mattson <jmattson@google.com> Reviewed-by: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20220901211811.2883855-2-jmattson@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 751b1e1 commit bbbe171

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
@@ -664,8 +664,9 @@ void kvm_set_cpu_caps(void)
664664
kvm_cpu_cap_set(X86_FEATURE_SPEC_CTRL_SSBD);
665665

666666
kvm_cpu_cap_mask(CPUID_7_1_EAX,
667-
F(AVX_VNNI) | F(AVX512_BF16) | F(CMPCCXADD) | F(AMX_FP16) |
668-
F(AVX_IFMA)
667+
F(AVX_VNNI) | F(AVX512_BF16) | F(CMPCCXADD) |
668+
F(FZRM) | F(FSRS) | F(FSRC) |
669+
F(AMX_FP16) | F(AVX_IFMA)
669670
);
670671

671672
kvm_cpu_cap_init_kvm_defined(CPUID_7_1_EDX,

0 commit comments

Comments
 (0)