kvm: mark UpperHalf PTE-s as global

UpperHalf is shared with all address spaces.

PiperOrigin-RevId: 379790539
This commit is contained in:
Andrei Vagin
2021-06-16 12:57:38 -07:00
committed by gVisor bot
parent 4add64d2b5
commit 47149b7c42
+2 -2
View File
@@ -485,7 +485,7 @@ func (m *machine) mapUpperHalf(pageTable *pagetables.PageTables) {
pageTable.Map(
hostarch.Addr(ring0.KernelStartAddress|r.virtual),
r.length,
pagetables.MapOpts{AccessType: hostarch.Execute},
pagetables.MapOpts{AccessType: hostarch.Execute, Global: true},
physical)
}
})
@@ -498,7 +498,7 @@ func (m *machine) mapUpperHalf(pageTable *pagetables.PageTables) {
pageTable.Map(
hostarch.Addr(ring0.KernelStartAddress|start),
regionLen,
pagetables.MapOpts{AccessType: hostarch.ReadWrite},
pagetables.MapOpts{AccessType: hostarch.ReadWrite, Global: true},
physical)
}
}