Commit cc3a6f72 authored by Jim Mattson's avatar Jim Mattson Committed by Jason Zeng
Browse files

KVM: x86: Advertise fast REP string features inherent to the CPU

mainline inclusion
from mainline-v6.3-rc1
commit 2a4209d6
category: feature
feature: SPR fast rep string operations
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6YPV0
CVE: N/A

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2a4209d6a9cb51082813e3081e1172ae68d27935



Intel-SIG: commit 2a4209d6 ("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: default avatarJim Mattson <jmattson@google.com>
Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220901211811.2883855-2-jmattson@google.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
[ jason: resolve conflicts and amend commit log ]
Signed-off-by: default avatarJason Zeng <jason.zeng@intel.com>
parent 31bbc99f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -496,7 +496,8 @@ 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,