Skip to content

Commit 1f6b7fe

Browse files
superm1smb49
authored andcommitted
x86/CPU/AMD: Clear virtualized VMLOAD/VMSAVE on Zen4 client
BugLink: https://bugs.launchpad.net/bugs/2101042 commit a5ca1dc46a6b610dd4627d8b633d6c84f9724ef0 upstream. 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 <mario.limonciello@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=219009 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent cac731d commit 1f6b7fe

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
@@ -1061,6 +1061,17 @@ static void init_amd_zen4(struct cpuinfo_x86 *c)
10611061

10621062
if (!cpu_has(c, X86_FEATURE_HYPERVISOR))
10631063
msr_set_bit(MSR_ZEN4_BP_CFG, MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT);
1064+
1065+
/*
1066+
* These Zen4 SoCs advertise support for virtualized VMLOAD/VMSAVE
1067+
* in some BIOS versions but they can lead to random host reboots.
1068+
*/
1069+
switch (c->x86_model) {
1070+
case 0x18 ... 0x1f:
1071+
case 0x60 ... 0x7f:
1072+
clear_cpu_cap(c, X86_FEATURE_V_VMSAVE_VMLOAD);
1073+
break;
1074+
}
10641075
}
10651076

10661077
static void init_amd_zen5(struct cpuinfo_x86 *c)

0 commit comments

Comments
 (0)