diff options
author | Michael <gbps@ctf.re> | 2018-12-07 03:23:07 +0300 |
---|---|---|
committer | Alex Ionescu <ionescu007@users.noreply.github.com> | 2018-12-09 04:51:37 +0300 |
commit | e4a9bd6d91e829b5f42266943d5fb92fecd0a402 (patch) | |
tree | 474550241544b37f2c83edb69fd73bdcc03c3ee5 | |
parent | 0275e1e184bcf16314fcf789ddb16f0539440ec3 (diff) |
Fixed off-by-one edge case in memory type assignment
-rw-r--r-- | shvvmx.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -96,7 +96,7 @@ ShvVmxMtrrAdjustEffectiveMemoryType ( // Check if this large page falls within the boundary. If a single // physical page (4KB) touches it, we need to override the entire 2MB. // - if (((LargePageAddress + _2MB) >= VpData->MtrrData[i].PhysicalAddressMin) && + if (((LargePageAddress + _2MB - 1) >= VpData->MtrrData[i].PhysicalAddressMin) && (LargePageAddress <= VpData->MtrrData[i].PhysicalAddressMax)) { // |