Commit 38ed18e
committed
x86/mtrr: Check if fixed-range MTRR exists 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,
accessing these MSRs will trigger 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: 3ebad59 ("[PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending")
Tracked-On: OAM-132455
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>1 parent 28ae3c0 commit 38ed18e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
594 | | - | |
| 594 | + | |
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
| |||
0 commit comments