summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/ring0/pagetables/pagetables_amd64.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-11-22 20:07:49 +0000
committergVisor bot <gvisor-bot@google.com>2019-11-22 20:07:49 +0000
commit7912c51bc928278abdcdc143f14eb2bf8531b66a (patch)
tree1d8fc2331435f01519a1b84fefad4cd150877091 /pkg/sentry/platform/ring0/pagetables/pagetables_amd64.go
parentf504f6981cb86e9c0257498530b4c96fc8e4790e (diff)
parent07635d20d40e1a279c4b063abaaad51048400ed7 (diff)
Merge release-20191114.0-20-g07635d2 (automated)
Diffstat (limited to 'pkg/sentry/platform/ring0/pagetables/pagetables_amd64.go')
-rw-r--r--pkg/sentry/platform/ring0/pagetables/pagetables_amd64.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/sentry/platform/ring0/pagetables/pagetables_amd64.go b/pkg/sentry/platform/ring0/pagetables/pagetables_amd64.go
index 7aa6c524e..0c153cf8c 100644
--- a/pkg/sentry/platform/ring0/pagetables/pagetables_amd64.go
+++ b/pkg/sentry/platform/ring0/pagetables/pagetables_amd64.go
@@ -41,5 +41,14 @@ const (
entriesPerPage = 512
)
+// Init initializes a set of PageTables.
+//
+//go:nosplit
+func (p *PageTables) Init(allocator Allocator) {
+ p.Allocator = allocator
+ p.root = p.Allocator.NewPTEs()
+ p.rootPhysical = p.Allocator.PhysicalFor(p.root)
+}
+
// PTEs is a collection of entries.
type PTEs [entriesPerPage]PTE