Skip to content

Commit 845d382

Browse files
tlendackyIngo Molnar
authored andcommitted
x86/bugs: Update when to check for the LS_CFG SSBD mitigation
If either the X86_FEATURE_AMD_SSBD or X86_FEATURE_VIRT_SSBD features are present, then there is no need to perform the check for the LS_CFG SSBD mitigation support. Signed-off-by: Tom Lendacky <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent eab6870 commit 845d382

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/x86/kernel/cpu/amd.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,9 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
543543
nodes_per_socket = ((value >> 3) & 7) + 1;
544544
}
545545

546-
if (c->x86 >= 0x15 && c->x86 <= 0x17) {
546+
if (!boot_cpu_has(X86_FEATURE_AMD_SSBD) &&
547+
!boot_cpu_has(X86_FEATURE_VIRT_SSBD) &&
548+
c->x86 >= 0x15 && c->x86 <= 0x17) {
547549
unsigned int bit;
548550

549551
switch (c->x86) {

0 commit comments

Comments
 (0)