Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <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

authored by

Mario Limonciello and committed by
Borislav Petkov (AMD)
a5ca1dc4 59b723cd

+11
+11
arch/x86/kernel/cpu/amd.c
··· 924 { 925 if (!cpu_has(c, X86_FEATURE_HYPERVISOR)) 926 msr_set_bit(MSR_ZEN4_BP_CFG, MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT); 927 } 928 929 static void init_amd_zen5(struct cpuinfo_x86 *c)
··· 924 { 925 if (!cpu_has(c, X86_FEATURE_HYPERVISOR)) 926 msr_set_bit(MSR_ZEN4_BP_CFG, MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT); 927 + 928 + /* 929 + * These Zen4 SoCs advertise support for virtualized VMLOAD/VMSAVE 930 + * in some BIOS versions but they can lead to random host reboots. 931 + */ 932 + switch (c->x86_model) { 933 + case 0x18 ... 0x1f: 934 + case 0x60 ... 0x7f: 935 + clear_cpu_cap(c, X86_FEATURE_V_VMSAVE_VMLOAD); 936 + break; 937 + } 938 } 939 940 static void init_amd_zen5(struct cpuinfo_x86 *c)