diff options
Diffstat (limited to 'pkg/ring0/pagetables/allocator_unsafe.go')
-rw-r--r-- | pkg/ring0/pagetables/allocator_unsafe.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/ring0/pagetables/allocator_unsafe.go b/pkg/ring0/pagetables/allocator_unsafe.go index d08bfdeb3..191d0942b 100644 --- a/pkg/ring0/pagetables/allocator_unsafe.go +++ b/pkg/ring0/pagetables/allocator_unsafe.go @@ -17,23 +17,23 @@ package pagetables import ( "unsafe" - "gvisor.dev/gvisor/pkg/usermem" + "gvisor.dev/gvisor/pkg/hostarch" ) // newAlignedPTEs returns a set of aligned PTEs. func newAlignedPTEs() *PTEs { ptes := new(PTEs) - offset := physicalFor(ptes) & (usermem.PageSize - 1) + offset := physicalFor(ptes) & (hostarch.PageSize - 1) if offset == 0 { // Already aligned. return ptes } // Need to force an aligned allocation. - unaligned := make([]byte, (2*usermem.PageSize)-1) - offset = uintptr(unsafe.Pointer(&unaligned[0])) & (usermem.PageSize - 1) + unaligned := make([]byte, (2*hostarch.PageSize)-1) + offset = uintptr(unsafe.Pointer(&unaligned[0])) & (hostarch.PageSize - 1) if offset != 0 { - offset = usermem.PageSize - offset + offset = hostarch.PageSize - offset } return (*PTEs)(unsafe.Pointer(&unaligned[offset])) } |