diff options
author | Adin Scannell <ascannell@google.com> | 2018-06-11 18:16:13 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-06-11 18:17:15 -0700 |
commit | 41f766893ab804cd2d3ccfd782d97c022e987f79 (patch) | |
tree | e6405de1ff6561dad78e8155c100e5f8fc21aeed /pkg/sentry/platform/kvm | |
parent | 1397a413b49d6036f2586e85c8074aa3d4d6c6fa (diff) |
Minor ring0 interface cleanup.
- Remove unused methods.
- Provide declaration for asm function.
PiperOrigin-RevId: 200146850
Change-Id: Ic455c96ffe0d2e78ef15f824eb65d7de705b054a
Diffstat (limited to 'pkg/sentry/platform/kvm')
-rw-r--r-- | pkg/sentry/platform/kvm/machine.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/sentry/platform/kvm/machine.go b/pkg/sentry/platform/kvm/machine.go index 3c1e01241..ab2ccc695 100644 --- a/pkg/sentry/platform/kvm/machine.go +++ b/pkg/sentry/platform/kvm/machine.go @@ -40,7 +40,7 @@ type machine struct { nextSlot uint32 // kernel is the set of global structures. - kernel *ring0.Kernel + kernel ring0.Kernel // mappingCache is used for mapPhysical. mappingCache sync.Map @@ -135,7 +135,7 @@ func newMachine(vm int, vCPUs int) (*machine, error) { // issues when you've got > n active threads.) vCPUs = n } - m.kernel = ring0.New(ring0.KernelOpts{ + m.kernel.Init(ring0.KernelOpts{ PageTables: pagetables.New(newAllocator()), }) @@ -158,7 +158,7 @@ func newMachine(vm int, vCPUs int) (*machine, error) { fd: int(fd), machine: m, } - c.CPU.Init(m.kernel) + c.CPU.Init(&m.kernel) c.CPU.KernelSyscall = bluepillSyscall c.CPU.KernelException = bluepillException m.vCPUs[uint64(-id)] = c // See above. |