Documentation
¶
Index ¶
- type GSIAllocator
- type InitFile
- type LinuxLoader
- func (l *LinuxLoader) CPUCount() int
- func (l *LinuxLoader) Callbacks() hv.VMCallbacks
- func (l *LinuxLoader) ConfigureVCPU(vcpu hv.VirtualCPU) error
- func (l *LinuxLoader) Load(vm hv.VirtualMachine) error
- func (l *LinuxLoader) Loader() hv.VMLoader
- func (l *LinuxLoader) MemoryBase() uint64
- func (l *LinuxLoader) MemorySize() uint64
- func (l *LinuxLoader) NeedsInterruptSupport() bool
- func (l *LinuxLoader) OnCreateVCPU(vCpu hv.VirtualCPU) error
- func (l *LinuxLoader) OnCreateVM(vm hv.VirtualMachine) error
- func (l *LinuxLoader) OnCreateVMWithMemory(vm hv.VirtualMachine) error
- func (l *LinuxLoader) RunConfig() (hv.RunConfig, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GSIAllocator ¶
type GSIAllocator struct {
// contains filtered or unexported fields
}
GSIAllocator hands out global system interrupts, avoiding collisions between devices that need unique lines (e.g. virtio-mmio instances).
func NewGSIAllocator ¶
func NewGSIAllocator(start uint32, reserved []uint32) *GSIAllocator
func (*GSIAllocator) Allocate ¶
func (a *GSIAllocator) Allocate() uint32
type LinuxLoader ¶
type LinuxLoader struct {
NumCPUs int
MemSize uint64
MemBase uint64
GetCmdline func(arch hv.CpuArchitecture) ([]string, error)
GetInit func(arch hv.CpuArchitecture) (*ir.Program, error)
GetKernel func() (io.ReaderAt, int64, error)
GetSystemMap func() (io.ReaderAt, error)
CreateVM func(vm hv.VirtualMachine) error
CreateVMWithMemory func(vm hv.VirtualMachine) error
SerialStdout io.Writer
SerialStdin io.Reader
Devices []hv.DeviceTemplate
AdditionalFiles []InitFile
// GPUEnabled enables GPU support by loading virtio-gpu and virtio-input modules
GPUEnabled bool
// PreloadModules is a list of modules to preload when the kernel boots.
// This is populated automatically based on configuration (e.g. GPUEnabled).
PreloadModules []kernel.Module
// contains filtered or unexported fields
}
func (*LinuxLoader) Callbacks ¶
func (l *LinuxLoader) Callbacks() hv.VMCallbacks
func (*LinuxLoader) ConfigureVCPU ¶
func (l *LinuxLoader) ConfigureVCPU(vcpu hv.VirtualCPU) error
func (*LinuxLoader) Load ¶
func (l *LinuxLoader) Load(vm hv.VirtualMachine) error
Load implements hv.VMLoader.
func (*LinuxLoader) Loader ¶
func (l *LinuxLoader) Loader() hv.VMLoader
func (*LinuxLoader) MemoryBase ¶
func (l *LinuxLoader) MemoryBase() uint64
func (*LinuxLoader) MemorySize ¶
func (l *LinuxLoader) MemorySize() uint64
func (*LinuxLoader) NeedsInterruptSupport ¶
func (l *LinuxLoader) NeedsInterruptSupport() bool
func (*LinuxLoader) OnCreateVCPU ¶
func (l *LinuxLoader) OnCreateVCPU(vCpu hv.VirtualCPU) error
OnCreateVCPU implements hv.VMCallbacks.
func (*LinuxLoader) OnCreateVM ¶
func (l *LinuxLoader) OnCreateVM(vm hv.VirtualMachine) error
OnCreateVM implements hv.VMCallbacks.
func (*LinuxLoader) OnCreateVMWithMemory ¶
func (l *LinuxLoader) OnCreateVMWithMemory(vm hv.VirtualMachine) error
OnCreateVMWithMemory implements hv.VMCallbacks.
Click to show internal directories.
Click to hide internal directories.