x86/CPU/AMD: Clear virtualized VMLOAD/VMSAVE on Zen4 client
PATCH 1/1 x86/CPU/AMD: Clear virtualized VMLOAD/VMSAVE on Zen4 client
From: Mario Limonciello <[email protected]>
[ Upstream commit a5ca1dc46a6b610dd4627d8b633d6c84f9724ef0 ]
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.
---
Hi Greg, Sasha, and x86 amd maintainers,
I am working through the small CVE backports still missing from 6.6.y. This one addresses CVE-2024-53114. It clears virtualized VMLOAD/VMSAVE on affected Zen 4 client models.
The fix is already present in 6.12.y, 6.18.y, and 7.2.y, but not in 6.6.y. This fix also affects 6.1.y, which will need a separate backport; this submission contains only the 6.6.y patch.
The code change is identical to upstream.
Could you please queue it for 6.6.y?
CVE: CVE-2024-53114
Upstream: a5ca1dc46a6b610dd4627d8b633d6c84f9724ef0
AI assistance: An LLM helped identify, adapt, and validate this backport; I reviewed the resulting code and validation evidence.
Thanks,
Artem Dinaburg
arch/x86/kernel/cpu/amd.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/x86/kernel/cpu/amd.c +11 -0
@@ -1196,6 +1196,17 @@ static void init_amd_zen3(struct cpuinfo_x86 *c)static void init_amd_zen4 (struct cpuinfo_x86 *c) {init_amd_zen_common (); + +/* +* These Zen4 SoCs advertise support for virtualized VMLOAD/VMSAVE +* in some BIOS versions but they can lead to random host reboots. +*/ +switch (c->x86_model) { + case 0x18 ... 0x1f: + case 0x60 ... 0x7f: +clear_cpu_cap (c,X86_FEATURE_V_VMSAVE_VMLOAD ); +break ; + } }static void init_amd_zen5 (struct cpuinfo_x86 *c)
Signature · 1 line
2.39.5
Quoted 2 lines
This one addresses CVE-2024-53114. It clears virtualized VMLOAD/VMSAVE on affected Zen 4 client models.
Queued for 6.6, thanks.
Signature · 2 lines
Thanks, Sasha