control

package
v0.0.0-...-278237d Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2015 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InternalGuestError = errors.New("Internal guest error?")
View Source
var InvalidControlSocket = errors.New("Invalid control socket?")

Functions

This section is empty.

Types

type Control

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

func NewControl

func NewControl(
	control_fd int,
	real_init bool,
	model *machine.Model,
	vm *platform.Vm,
	tracer *loader.Tracer,
	proxy machine.Proxy,
	is_load bool) (*Control, error)

func (*Control) Ready

func (control *Control) Ready() (*rpc.Client, error)

func (*Control) Serve

func (control *Control) Serve()

type DeviceSettings

type DeviceSettings struct {
	// Name.
	Name string `json:"name"`

	// Drvier.
	Driver string `json:"driver"`

	// Debug?
	Debug bool `json:"debug"`

	// Pause?
	Paused bool `json:"paused"`
}

type Nop

type Nop struct{}

The Noop --

Many of our operations do not require a specific parameter or a specific return.

type Rpc

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

func NewRpc

func NewRpc(
	model *machine.Model,
	vm *platform.Vm,
	tracer *loader.Tracer) *Rpc

func (*Rpc) Device

func (rpc *Rpc) Device(settings *DeviceSettings, nop *Nop) error

func (*Rpc) Pause

func (rpc *Rpc) Pause(nopin *Nop, nopout *Nop) error

func (*Rpc) Reload

func (rpc *Rpc) Reload(in *Nop, out *Nop) error

func (*Rpc) State

func (rpc *Rpc) State(nop *Nop, res *State) error

func (*Rpc) Trace

func (rpc *Rpc) Trace(settings *TraceSettings, nop *Nop) error

func (*Rpc) Unpause

func (rpc *Rpc) Unpause(nopin *Nop, nopout *Nop) error

func (*Rpc) Vcpu

func (rpc *Rpc) Vcpu(settings *VcpuSettings, nop *Nop) error

type State

type State struct {
	// Our device state.
	// Note that we only encode state associated with
	// specific devices. The model type is a generic wrapped
	// around devices which *may* encode additional state,
	// but all the state associated with the model should be
	// regenerated on startup.
	Devices []machine.DeviceInfo `json:"devices,omitempty"`

	// Our vcpu state.
	// Similarly, this should encode all the state associated
	// with the underlying VM. If we have other internal platform
	// devices (such as APICs or PITs) then these should be somehow
	// encoded as generic devices.
	Vcpus []platform.VcpuInfo `json:"vcpus,omitempty"`
}

func SaveState

func SaveState(vm *platform.Vm, model *machine.Model) (State, error)

type TraceSettings

type TraceSettings struct {
	// Tracing?
	Enable bool `json:"enable"`
}

type VcpuSettings

type VcpuSettings struct {
	// Which vcpu?
	Id int `json:"id"`

	// Single stepping?
	Step bool `json:"step"`

	// Paused?
	Paused bool `json:"paused"`
}

Jump to

Keyboard shortcuts

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