summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-08-23 17:30:04 -0700
committergVisor bot <gvisor-bot@google.com>2021-08-23 17:30:04 -0700
commit2c3d7cb074f2406c058bf6cce8c2a050fa453165 (patch)
tree1a5b39d05ded0703fdb5be73dcaa350dad037348 /pkg/sentry/platform
parentbff58ecaaa997f3ed5596a9aafb3ffc2fa6c16b9 (diff)
parent28887fb46fe8f40f75f398c27f0a1f64c01354e4 (diff)
Merge pull request #6491 from avagin:kvm-mem-slot-overlap
PiperOrigin-RevId: 392554743
Diffstat (limited to 'pkg/sentry/platform')
-rw-r--r--pkg/sentry/platform/kvm/bluepill_fault.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/pkg/sentry/platform/kvm/bluepill_fault.go b/pkg/sentry/platform/kvm/bluepill_fault.go
index 8fd8287b3..7a3c97c5a 100644
--- a/pkg/sentry/platform/kvm/bluepill_fault.go
+++ b/pkg/sentry/platform/kvm/bluepill_fault.go
@@ -55,11 +55,7 @@ func calculateBluepillFault(physical uintptr, phyRegions []physicalRegion) (virt
}
// Adjust the block to match our size.
- physicalStart = alignedPhysical & faultBlockMask
- if physicalStart < pr.physical {
- // Bound the starting point to the start of the region.
- physicalStart = pr.physical
- }
+ physicalStart = pr.physical + (alignedPhysical-pr.physical)&faultBlockMask
virtualStart = pr.virtual + (physicalStart - pr.physical)
physicalEnd := physicalStart + faultBlockSize
if physicalEnd > end {