Skip to content

Commit ee3a66f

Browse files
committed
kvm: x86: SRSO_USER_KERNEL_NO is not synthesized
SYNTHESIZED_F() generally is used together with setup_force_cpu_cap(), i.e. when it makes sense to present the feature even if cpuid does not have it *and* the VM is not able to see the difference. For example, it can be used when mitigations on the host automatically protect the guest as well. The "SYNTHESIZED_F(SRSO_USER_KERNEL_NO)" line came in as a conflict resolution between the CPUID overhaul from the KVM tree and support for the feature in the x86 tree. Using it right now does not hurt, or make a difference for that matter, because there is no setup_force_cpu_cap(X86_FEATURE_SRSO_USER_KERNEL_NO). However, it is a little less future proof in case such a setup_force_cpu_cap() appears later, for a case where the kernel somehow is not vulnerable but the guest would have to apply the mitigation. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 2014c95 commit ee3a66f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/cpuid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ void kvm_set_cpu_caps(void)
11801180
SYNTHESIZED_F(SBPB),
11811181
SYNTHESIZED_F(IBPB_BRTYPE),
11821182
SYNTHESIZED_F(SRSO_NO),
1183-
SYNTHESIZED_F(SRSO_USER_KERNEL_NO),
1183+
F(SRSO_USER_KERNEL_NO),
11841184
);
11851185

11861186
kvm_cpu_cap_init(CPUID_8000_0022_EAX,

0 commit comments

Comments
 (0)