Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ionescu007/SimpleVisor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <gbps@ctf.re>2018-12-07 03:23:07 +0300
committerAlex Ionescu <ionescu007@users.noreply.github.com>2018-12-09 04:51:37 +0300
commite4a9bd6d91e829b5f42266943d5fb92fecd0a402 (patch)
tree474550241544b37f2c83edb69fd73bdcc03c3ee5
parent0275e1e184bcf16314fcf789ddb16f0539440ec3 (diff)
Fixed off-by-one edge case in memory type assignment
-rw-r--r--shvvmx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shvvmx.c b/shvvmx.c
index d7e9958..f2dc98f 100644
--- a/shvvmx.c
+++ b/shvvmx.c
@@ -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))
{
//