summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/kvm/machine_arm64_unsafe.go
diff options
context:
space:
mode:
authorBin Lu <bin.lu@arm.com>2020-02-20 01:12:03 -0500
committerBin Lu <bin.lu@arm.com>2020-02-20 06:43:27 +0000
commitde68e1d8c437e6234f5e413d7cad6f892a4452d3 (patch)
tree6405221512939b3868cb2d512365cf3a86306cb6 /pkg/sentry/platform/kvm/machine_arm64_unsafe.go
parentec5630527bc4473081048d2d13d1dcfadc6c7cdd (diff)
Code Clean:Move getUserRegisters into dieArchSetup() and other small changes.
Consistent with QEMU, getUserRegisters() should be an arch-specific function. So, it should be called in dieArchSetup(). With this patch and the pagetable/pcid patch, the kvm modules on Arm64 can be built successfully. Signed-off-by: Bin Lu <bin.lu@arm.com>
Diffstat (limited to 'pkg/sentry/platform/kvm/machine_arm64_unsafe.go')
-rw-r--r--pkg/sentry/platform/kvm/machine_arm64_unsafe.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/pkg/sentry/platform/kvm/machine_arm64_unsafe.go b/pkg/sentry/platform/kvm/machine_arm64_unsafe.go
index 1c8384e6b..b531f2f85 100644
--- a/pkg/sentry/platform/kvm/machine_arm64_unsafe.go
+++ b/pkg/sentry/platform/kvm/machine_arm64_unsafe.go
@@ -29,30 +29,6 @@ import (
"gvisor.dev/gvisor/pkg/usermem"
)
-// setMemoryRegion initializes a region.
-//
-// This may be called from bluepillHandler, and therefore returns an errno
-// directly (instead of wrapping in an error) to avoid allocations.
-//
-//go:nosplit
-func (m *machine) setMemoryRegion(slot int, physical, length, virtual uintptr) syscall.Errno {
- userRegion := userMemoryRegion{
- slot: uint32(slot),
- flags: 0,
- guestPhysAddr: uint64(physical),
- memorySize: uint64(length),
- userspaceAddr: uint64(virtual),
- }
-
- // Set the region.
- _, _, errno := syscall.RawSyscall(
- syscall.SYS_IOCTL,
- uintptr(m.fd),
- _KVM_SET_USER_MEMORY_REGION,
- uintptr(unsafe.Pointer(&userRegion)))
- return errno
-}
-
type kvmVcpuInit struct {
target uint32
features [7]uint32