summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/kvm/kvm.go
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2018-06-06 21:47:39 -0700
committerShentubot <shentubot@google.com>2018-06-06 21:48:24 -0700
commit1b5062263b4a3ca3dc0271d9e06ad0113197344c (patch)
tree69d6536240ffa1db76aaef0d4f3a873d86a0dfaf /pkg/sentry/platform/kvm/kvm.go
parent206e90d057211f2ac53174907b2ff04801f9a481 (diff)
Add allocator abstraction for page tables.
In order to prevent possible garbage collection and reuse of page table pages prior to invalidation, introduce a former allocator abstraction that can ensure entries are held during a single traversal. This also cleans up the abstraction and splits it out of the machine itself. PiperOrigin-RevId: 199581636 Change-Id: I2257d5d7ffd9c36f9b7ecd42f769261baeaf115c
Diffstat (limited to 'pkg/sentry/platform/kvm/kvm.go')
-rw-r--r--pkg/sentry/platform/kvm/kvm.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/platform/kvm/kvm.go b/pkg/sentry/platform/kvm/kvm.go
index 6defb1c46..13c363993 100644
--- a/pkg/sentry/platform/kvm/kvm.go
+++ b/pkg/sentry/platform/kvm/kvm.go
@@ -121,7 +121,7 @@ func (*KVM) MaxUserAddress() usermem.Addr {
// NewAddressSpace returns a new pagetable root.
func (k *KVM) NewAddressSpace(_ interface{}) (platform.AddressSpace, <-chan struct{}, error) {
// Allocate page tables and install system mappings.
- pageTables := k.machine.kernel.PageTables.New()
+ pageTables := k.machine.kernel.PageTables.New(newAllocator())
applyPhysicalRegions(func(pr physicalRegion) bool {
// Map the kernel in the upper half.
pageTables.Map(