diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-08-24 00:35:00 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-08-24 00:35:00 +0000 |
commit | 8e1aaf0dcfe14340af041c99531862b4eed3cb2c (patch) | |
tree | 97a83f9cf5539b1bc65144cbc9d68ab355335a2e | |
parent | c365223bf83fac91553de0d5756d3c0746dcbe46 (diff) | |
parent | 2c3d7cb074f2406c058bf6cce8c2a050fa453165 (diff) |
Merge release-20210816.0-29-g2c3d7cb07 (automated)
-rw-r--r-- | pkg/sentry/platform/kvm/bluepill_fault.go | 6 |
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 { |