Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

x86/mtrr: Check if fixed-range MTRR exists in mtrr_save_fixed_ranges()#130

Open
jiaqingz-dev wants to merge 1 commit intoprojectceladon:celadon/u/mr0/masterfrom
jiaqingz-dev:mtrr-fix
Open

x86/mtrr: Check if fixed-range MTRR exists in mtrr_save_fixed_ranges()#130
jiaqingz-dev wants to merge 1 commit intoprojectceladon:celadon/u/mr0/masterfrom
jiaqingz-dev:mtrr-fix

Conversation

@jiaqingz-dev
Copy link
Contributor

@jiaqingz-dev jiaqingz-dev commented May 12, 2025

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")
Cc: stable@vger.kernel.org

Tracked-On: OAM-132466

@sysopenci sysopenci added Valid commit message Pending Developer Approval Pending Developer Approval Pending PR Review Pending PR Review Engineering Build Not Started Engineering Build Not Started labels May 12, 2025
@sysopenci
Copy link

one of the dependent pr's program name is not compatable with other dependent prs, for more details please check tracked_on

@sysopenci
Copy link

one of the dependent pr's program name is not compatable with other dependent prs, for more details please check tracked_on

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-132466
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
@sysopenci sysopenci added Developer Approved and removed Pending Developer Approval Pending Developer Approval labels May 13, 2025
@sysopenci
Copy link

Android CI has started Engineering Build for this issue ,Please check the linked Tracked-On issue/Android CI Web for more details.

@sysopenci
Copy link

FAILURE: Android CI has completed Engineering Build for this issue.Please check the linked Tracked-On issue/Android CI Web for more details.

@sysopenci sysopenci added Engineering Build Failed and removed Engineering Build Not Started Engineering Build Not Started labels May 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants