diff options
| author | Jiaqing Zhao <[email protected]> | 2025-05-09 17:06:33 +0000 |
|---|---|---|
| committer | Borislav Petkov (AMD) <[email protected]> | 2025-05-12 11:04:40 +0000 |
| commit | 824c6384e8d9275d4ec7204f3f79a4ac6bc10379 (patch) | |
| tree | 7bef58fba2f2a048024cf699be5bcc652a863555 /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | |
| parent | Linux 6.15-rc6 (diff) | |
| download | kernel-824c6384e8d9275d4ec7204f3f79a4ac6bc10379.tar.gz kernel-824c6384e8d9275d4ec7204f3f79a4ac6bc10379.zip | |
x86/mtrr: Check if fixed-range MTRRs exist in mtrr_save_fixed_ranges()
When suspending, save_processor_state() calls mtrr_save_fixed_ranges()
to save fixed-range MTRRs.
On platforms without fixed-range MTRRs like the ACRN hypervisor which
has removed fixed-range MTRR emulation, accessing these MSRs will
trigger an unchecked MSR access error. Make sure fixed-range MTRRs are
supported before access to prevent such error.
Since mtrr_state.have_fixed is only set when MTRRs are present and
enabled, checking the CPU feature flag in mtrr_save_fixed_ranges() is
unnecessary.
Fixes: 3ebad5905609 ("[PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending")
Signed-off-by: Jiaqing Zhao <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Link: https://lore.kernel.org/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
0 files changed, 0 insertions, 0 deletions
