arch

package
v0.0.0-...-9c233c6 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MMIOHoleAddr      = 0x0d0000000
	AfterMMIOHoleAddr = 0x100000000
)

Variables

This section is empty.

Functions

func ValidateKVM

func ValidateKVM(kfd *os.File) error

ValidateKVM returns an error if KVM doesn't support the required extensions.

Types

type Arch

type Arch struct {
	// contains filtered or unexported fields
}

func New

func New(kfd *os.File) (*Arch, error)

func (*Arch) SetupMemory

func (*Arch) SetupMemory(mem []byte) ([]kvm.UserspaceMemoryRegion, error)

SetupMemory partitions mem into regions. If mem is larger than 3G, it is split into two regions with a 1G hole for mmio devies at MMIOHoleAddr.

func (*Arch) SetupVCPU

func (a *Arch) SetupVCPU(slot int, vcpu *kvm.VCPU, state *kvm.VCPUState) error

SetupVCPU sets the VCPU's cpuid to the default cpuid supported by KVM.

func (*Arch) SetupVM

func (*Arch) SetupVM(vm *kvm.VM) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳