diff options
| author | Ashish Kalra <ashish.kalra@amd.com> | 2026-10-28 19:49:22 +0000 |
|---|---|---|
| committer | Borislav Petkov (AMD) <bp@alien8.de> | 2026-11-04 17:09:14 -0800 |
| commit | 2803a7993d4cd9354f851dfcab46991d676f4e6b (patch) | |
| tree | c8a86f9d8d38e01c97267f0e969ed2455da52905 /scripts/Makefile.thinlto | |
| parent | 6bb462e8e5334f7bd3384843253e96112c98f5af (diff) | |
| download | linux-next-2803a7993d4cd9354f851dfcab46991d676f4e6b.tar.gz linux-next-2803a7993d4cd9354f851dfcab46991d676f4e6b.zip | |
x86/sev: Clear RMPOPT when segmented RMP is disabled by firmware
Segmented RMP support is advertised via X86_FEATURE_SEGMENTED_RMP, and the
firmware enables it via MSR_AMD64_RMP_CFG[SEG_RMP_ENABLED]. The latter can be
cleared in platform BIOS by the user, in which case the system runs in
contiguous RMP setting.
snp_probe_rmptable_info() does not clear X86_FEATURE_RMPOPT in the
advertised-but-firmware-disabled case.
As a result, this does not prevent snp_enable_rmpopt() from trying to program
MSR_AMD64_RMPOPT_BASE, which raises a #GP on the MSR access.
Make sure X86_FEATURE_RMPOPT is cleared in all cases where segmented RMP is
not enabled.
[ bp:
- Put the commit message on Ozempic
- Simplify snp_probe_rmptable_info()
- Fix feature check order in snp_enable_rmpopt()
- Add RMPOPT feature dependency on SEV_SNP ]
Fixes: 15d974be0a3b ("x86/sev: Initialize RMPOPT configuration MSRs")
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/56da047d63b22f03a7e709fc172a5543da894d67.1793216372.git.ashish.kalra@amd.com
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
