summaryrefslogtreecommitdiffhomepage
path: root/pkg/ring0/pagetables
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-05-01 06:11:37 +0000
committergVisor bot <gvisor-bot@google.com>2021-05-01 06:11:37 +0000
commit7e11a1532fdb66a9e89d55a7d3f951c602315c17 (patch)
tree1f27f9c516d8e16bbec7b7d436b428b4ebee3e96 /pkg/ring0/pagetables
parent4685f645de890131158be0290c470edb59484105 (diff)
parentcde8e8b7a905ce53fe72a1a71b86e9ef352bbc3a (diff)
Merge release-20210419.0-50-gcde8e8b7a (automated)
Diffstat (limited to 'pkg/ring0/pagetables')
-rw-r--r--pkg/ring0/pagetables/pagetables.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/ring0/pagetables/pagetables.go b/pkg/ring0/pagetables/pagetables.go
index 3f17fba49..9dac53c80 100644
--- a/pkg/ring0/pagetables/pagetables.go
+++ b/pkg/ring0/pagetables/pagetables.go
@@ -322,3 +322,12 @@ func (p *PageTables) Lookup(addr hostarch.Addr, findFirst bool) (virtual hostarc
func (p *PageTables) MarkReadOnlyShared() {
p.readOnlyShared = true
}
+
+// PrefaultRootTable touches the root table page to be sure that its physical
+// pages are mapped.
+//
+//go:nosplit
+//go:noinline
+func (p *PageTables) PrefaultRootTable() PTE {
+ return p.root[0]
+}