kvm

package
v0.0.0-...-ba09d25 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: Apache-2.0, MIT Imports: 33 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 OpenDevice

func OpenDevice() (*os.File, error)

OpenDevice opens the KVM device at /dev/kvm and returns the File.

Types

type KVM

type KVM struct {
	platform.NoCPUPreemptionDetection

	// KVM never changes mm_structs.
	platform.UseHostProcessMemoryBarrier
	// contains filtered or unexported fields
}

KVM represents a lightweight VM context.

func New

func New(deviceFile *os.File) (*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() hostarch.Addr

MaxUserAddress returns the first address that may not be used.

func (*KVM) MinUserAddress

func (*KVM) MinUserAddress() hostarch.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.

func (*KVM) SyscallFilters

func (*KVM) SyscallFilters() seccomp.SyscallRules

SyscallFilters returns syscalls made exclusively by the KVM platform.

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