kvm

package
v0.0.0-...-23e6066 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2018 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package kvm provides a kvm-based implementation of the platform interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TranslateToPhysical

func TranslateToPhysical(virtual uintptr) (physical uintptr, length uintptr, ok bool)

TranslateToPhysical translates the given virtual address.

Precondition: physicalInit must have been called.

Types

type KVM

type KVM struct {
	platform.NoCPUPreemptionDetection

	// filemem is our memory source.
	*filemem.FileMem
	// contains filtered or unexported fields
}

KVM represents a lightweight VM context.

func New

func New() (*KVM, error)

New returns a new KVM-based implementation of the platform interface.

func (*KVM) CooperativelySchedulesAddressSpace

func (*KVM) CooperativelySchedulesAddressSpace() bool

CooperativelySchedulesAddressSpace implements platform.Platform.CooperativelySchedulesAddressSpace.

func (*KVM) MapUnit

func (*KVM) MapUnit() uint64

MapUnit implements platform.Platform.MapUnit.

func (*KVM) MaxUserAddress

func (*KVM) MaxUserAddress() usermem.Addr

MaxUserAddress returns the first address that may not be used.

func (*KVM) Memory

func (k *KVM) Memory() platform.Memory

Memory returns the platform memory used to do allocations.

func (*KVM) MinUserAddress

func (*KVM) MinUserAddress() usermem.Addr

MinUserAddress returns the lowest available address.

func (*KVM) NewAddressSpace

func (k *KVM) NewAddressSpace(_ interface{}) (platform.AddressSpace, <-chan struct{}, error)

NewAddressSpace returns a new pagetable root.

func (*KVM) NewContext

func (k *KVM) NewContext() platform.Context

NewContext returns an interruptible context.

func (*KVM) SupportsAddressSpaceIO

func (*KVM) SupportsAddressSpaceIO() bool

SupportsAddressSpaceIO implements platform.Platform.SupportsAddressSpaceIO.

Directories

Path Synopsis
Package testutil provides common assembly stubs for testing.
Package testutil provides common assembly stubs for testing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL