diff options
author | Lai Jiangshan <jiangshan.ljs@antfin.com> | 2020-08-13 13:01:20 +0800 |
---|---|---|
committer | Lai Jiangshan <laijs@linux.alibaba.com> | 2020-11-03 00:10:32 +0800 |
commit | 3425485b7c47861422c8bf285635d11911035383 (patch) | |
tree | fa412b1b8beaebae2bc05cd78b8e16f4c8727c7e /pkg/sentry/platform/kvm/kvm.go | |
parent | dd056112b72abde9f570a69ad7cfc2a0a6beed14 (diff) |
kvm: share upper halves among all pagtables
Fixes: #509
Signed-off-by: Lai Jiangshan <jiangshan.ljs@antfin.com>
Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Diffstat (limited to 'pkg/sentry/platform/kvm/kvm.go')
-rw-r--r-- | pkg/sentry/platform/kvm/kvm.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/sentry/platform/kvm/kvm.go b/pkg/sentry/platform/kvm/kvm.go index dd45ad10b..5979aef97 100644 --- a/pkg/sentry/platform/kvm/kvm.go +++ b/pkg/sentry/platform/kvm/kvm.go @@ -158,8 +158,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 := pagetables.New(newAllocator()) - k.machine.mapUpperHalf(pageTables) + pageTables := pagetables.NewWithUpper(newAllocator(), k.machine.upperSharedPageTables, ring0.KernelStartAddress) // Return the new address space. return &addressSpace{ |