Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes a number of issues in the MTRR-related code in
EptBuildMtrrMap()
andEptGetMemoryType()
. The changes themselves are thoroughly documented in the commit messages, so please refer to those for more details.I think most of the things I (hopefully...) fixed were probably medium severity issues at worst, and I wouldn't normally have even noticed them, let alone made a PR, except for commit 580907e, which fixes a critical issue where
load vmm
was reliably causing my Z790 + i5 13600K machine to become completely unresponsive (i.e. requiring a hard shutdown/power cycle).Re: the other commits: I am pretty sure these are real fixes for real bugs, but these were mostly just things I noticed while going through the code and attempting to narrow down the cause of the system hang, so I can't speak to their severity. I can't honestly say I've noticed any difference (for better or worse) from them.
Fixes: #..? Possibly #323, but only if that is in fact the same issue I was seeing. There are some discrepancies with this bug description compared to what this PR is fixing that make me doubt this - see my comment for details.
This PR definitely fixes the full system hang in
load vmm
on my machine, as well as for at least one other person I found who was running into the same issue (also on a Z790 + 13th gen machine).Type of change