aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorTony Battersby <[email protected]>2023-06-15 22:33:52 +0200
committerThomas Gleixner <[email protected]>2023-06-20 14:51:46 +0200
commit9b040453d4440659f33dc6f0aa26af418ebfe70b (patch)
tree6dd5481b7467facd5c9f30d9be4fba7c734db745 /lib/memory-notifier-error-inject.c
parent1f5e7eb7868e42227ac426c96d437117e6e06e8e (diff)
x86/smp: Dont access non-existing CPUID leaf
stop_this_cpu() tests CPUID leaf 0x8000001f::EAX unconditionally. Intel CPUs return the content of the highest supported leaf when a non-existing leaf is read, while AMD CPUs return all zeros for unsupported leafs. So the result of the test on Intel CPUs is lottery. While harmless it's incorrect and causes the conditional wbinvd() to be issued where not required. Check whether the leaf is supported before reading it. [ tglx: Adjusted changelog ] Fixes: 08f253ec3767 ("x86/cpu: Clear SME feature flag when not in use") Signed-off-by: Tony Battersby <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Reviewed-by: Borislav Petkov (AMD) <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions