Message ID | 20220901211811.2883855-2-jmattson@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3,1/2] x86/cpufeatures: Add macros for Intel's new fast rep string features | expand |
The shortlog is trying to win some kind of award. And technically, KVM_GET_SUPPORTED_CPUID advertises features to userspace, not to the guest. How about this? KVM: x86: Advertise fast REP string features inherent to the CPU On Thu, Sep 01, 2022, Jim Mattson wrote: > 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> With a less cryptic shortlog, Reviewed-by: Sean Christopherson <seanjc@google.com>
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 75dcf7a72605..172cbfd60946 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -636,7 +636,7 @@ void kvm_set_cpu_caps(void) kvm_cpu_cap_set(X86_FEATURE_SPEC_CTRL_SSBD); kvm_cpu_cap_mask(CPUID_7_1_EAX, - F(AVX_VNNI) | F(AVX512_BF16) + F(AVX_VNNI) | F(AVX512_BF16) | F(FZRM) | F(FSRS) | F(FSRC) ); kvm_cpu_cap_mask(CPUID_D_1_EAX,
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> --- arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)