Skip to content

Commit ec75530

Browse files
committed
x86/CPU/AMD: Clear virtualized VMLOAD/VMSAVE on Zen4 client
JIRA: https://issues.redhat.com/browse/RHEL-67470 CVE: CVE-2024-53114 Upstream: Merged commit a5ca1dc Author: Mario Limonciello <[email protected]> Date: Tue Nov 5 10:02:34 2024 -0600 x86/CPU/AMD: Clear virtualized VMLOAD/VMSAVE on Zen4 client A number of Zen4 client SoCs advertise the ability to use virtualized VMLOAD/VMSAVE, but using these instructions is reported to be a cause of a random host reboot. These instructions aren't intended to be advertised on Zen4 client so clear the capability. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Cc: [email protected] Link: https://bugzilla.kernel.org/show_bug.cgi?id=219009 Signed-off-by: Jon Maloy <[email protected]>
1 parent 8112ec1 commit ec75530

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

arch/x86/kernel/cpu/amd.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,17 @@ static void init_amd_zen4(struct cpuinfo_x86 *c)
912912
{
913913
if (!cpu_has(c, X86_FEATURE_HYPERVISOR))
914914
msr_set_bit(MSR_ZEN4_BP_CFG, MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT);
915+
916+
/*
917+
* These Zen4 SoCs advertise support for virtualized VMLOAD/VMSAVE
918+
* in some BIOS versions but they can lead to random host reboots.
919+
*/
920+
switch (c->x86_model) {
921+
case 0x18 ... 0x1f:
922+
case 0x60 ... 0x7f:
923+
clear_cpu_cap(c, X86_FEATURE_V_VMSAVE_VMLOAD);
924+
break;
925+
}
915926
}
916927

917928
static void init_amd_zen5(struct cpuinfo_x86 *c)

0 commit comments

Comments
 (0)