mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 15:03:53 +02:00
KVM: SVM: Set synthesized TSA CPUID flags
Commit f3f9deccfc
in the LTS tree.
VERW_CLEAR is supposed to be set only by the hypervisor to denote TSA
mitigation support to a guest. SQ_NO and L1_NO are both synthesizable,
and are going to be set by hw CPUID on future machines.
So keep the kvm_cpu_cap_init_kvm_defined() invocation *and* set them
when synthesized.
This fix is stable-only.
Co-developed-by: Jinpu Wang <jinpu.wang@ionos.com>
Signed-off-by: Jinpu Wang <jinpu.wang@ionos.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <stable@vger.kernel.org> # 6.1.y
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0389b0697a
commit
0b8f64204e
|
@ -770,10 +770,15 @@ void kvm_set_cpu_caps(void)
|
|||
if (cpu_feature_enabled(X86_FEATURE_SRSO_NO))
|
||||
kvm_cpu_cap_set(X86_FEATURE_SRSO_NO);
|
||||
|
||||
kvm_cpu_cap_check_and_set(X86_FEATURE_VERW_CLEAR);
|
||||
|
||||
kvm_cpu_cap_init_kvm_defined(CPUID_8000_0021_ECX,
|
||||
F(TSA_SQ_NO) | F(TSA_L1_NO)
|
||||
);
|
||||
|
||||
kvm_cpu_cap_check_and_set(X86_FEATURE_TSA_SQ_NO);
|
||||
kvm_cpu_cap_check_and_set(X86_FEATURE_TSA_L1_NO);
|
||||
|
||||
/*
|
||||
* Hide RDTSCP and RDPID if either feature is reported as supported but
|
||||
* probing MSR_TSC_AUX failed. This is purely a sanity check and
|
||||
|
|
Loading…
Reference in New Issue
Block a user