~/bend-docscommunity

src/vmm/machine.bend checks

raw source on the hub · import 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/machine.bend as Machine

13 imports
import Base
import ../lib/u64.bend as U
import ../lib/bytes.bend as B
import ../arm64/esr.bend as E
import ../arm64/psci.bend as P
import ../dev/pl011.bend as Uart
import ../dev/pl031.bend as Rtc
import ../dev/pflash.bend as Pf
import ../net/nat.bend as Nt
import ../virtio/device.bend as D
import ../virtio/input.bend as In
import ./layout.bend as L
import ./abi.bend as V

Types

type Control source · line 59 · raw

Data

type Machine source · line 68 · raw

Data

type Step source · line 109 · raw

Data

One handled exit: the machine after it and what the vCPU does next.

type Wrote source · line 204 · raw

Data

A virtio write: the devices after it, the bytes the guest wrote to hvc0 and the frames it transmitted.

Definitions

def Machine.devs source · line 72 · raw

@kinds:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.DevKind> -> List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>

One fresh device per kind, in slot order.

def Machine.lows source · line 80 · raw

@kinds:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.DevKind> -> List<&2, Bool>

One low interrupt line per kind.

def Machine.new source · line 89 · raw

@ncpus:Nat -> @kinds:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.DevKind> -> Machine

ncpus CPUs (only CPU 0 on), a fresh UART, one virtio device per kind in slot order, a fresh RTC and NAT, every interrupt line low.

def Machine.slots source · line 96 · raw

@devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @+n:U32 -> List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/layout.Region>

The regions of virtio slots n, n+1, ... for the devices left.

def Machine.bus source · line 103 · raw

@m:Machine -> List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/layout.Region>

def Machine.line source · line 115 · raw

@-R:Type -> @intid:U32 -> @old:Bool -> @new:Bool -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Bool>

The new level of a line; VmIrq when it differs from the old one.

def Machine.dev_lines source · line 132 · raw

@-R:Type -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @lines:List<&2, Bool> -> @+n:U32 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, List<&2, Bool>>

The lines of the virtio devices in slots n, n+1, ...; a device without a recorded level counts as low.

def Machine.irqs.at source · line 149 · raw

@-R:Type -> @+now:U32 -> @m:Machine -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

Raises or lowers every line whose level changed and records the new levels; the RTC's at time now.

def Machine.alarm_armed source · line 160 · raw

@m:Machine -> Bool

Whether the RTC's alarm interrupt is unmasked (IMSC bit 0): only then does its line depend on the time.

def Machine.irqs.go source · line 165 · raw

@-R:Type -> @armed:Bool -> @m:Machine -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

def Machine.irqs source · line 177 · raw

@-R:Type -> @+m:Machine -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

The same, at the time Op.now answers (read only when the alarm is armed, which keeps a host clock call off every exit).

def Machine.devs_read.head source · line 182 · raw

@t:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @r:Pair(0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev, U32) -> Pair(List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>, U32)

def Machine.devs_read.tail source · line 187 · raw

@d:0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev -> @r:Pair(List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>, U32) -> Pair(List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>, U32)

def Machine.devs_read source · line 193 · raw

@devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @n:Nat -> @off:U32 -> @size:U32 -> Pair(List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>, U32)

The read of virtio device n of the list; 0 past its end.

def Machine.wrote.head source · line 207 · raw

@t:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @o:0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.DevOut -> Wrote

def Machine.wrote.tail source · line 212 · raw

@d:0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev -> @w:Wrote -> Wrote

def Machine.devs_write source · line 218 · raw

@-R:Type -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @n:Nat -> @off:U32 -> @v:U32 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Wrote>

The write to virtio device n of the list; nothing past its end.

def Machine.uart_read source · line 231 · raw

@p:0x6612f1a246de4bc93112c7667cc9966a/src/arm64/psci.PsciState -> @ui:Bool -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @lines:List<&2, Bool> -> @rt:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl031.Pl031 -> @ri:Bool -> @nt:0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.Slirp -> @fl:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pflash.Pflash -> @r:Pair(0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl011.Pl011, U32) -> Pair(Machine, U32)

def Machine.virtio_read source · line 236 · raw

@p:0x6612f1a246de4bc93112c7667cc9966a/src/arm64/psci.PsciState -> @u:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl011.Pl011 -> @ui:Bool -> @lines:List<&2, Bool> -> @rt:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl031.Pl031 -> @ri:Bool -> @nt:0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.Slirp -> @fl:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pflash.Pflash -> @r:Pair(List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>, U32) -> Pair(Machine, U32)

def Machine.dev_read source · line 242 · raw

@n:Nat -> @m:Machine -> @off:U32 -> @size:U32 -> Pair(Machine, U32)

The 32-bit read of bus device n (0 the UART, k+1 virtio slot k) at off.

def Machine.print source · line 250 · raw

@-R:Type -> @bs:List<&2, U32> -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Unit>

Prints bytes on the console, when there are any.

def Machine.uart_write source · line 257 · raw

@-R:Type -> @p:0x6612f1a246de4bc93112c7667cc9966a/src/arm64/psci.PsciState -> @ui:Bool -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @lines:List<&2, Bool> -> @rt:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl031.Pl031 -> @ri:Bool -> @nt:0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.Slirp -> @fl:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pflash.Pflash -> @r:Pair(0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl011.Pl011, List<&2, U32>) -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

def Machine.cmds source · line 267 · raw

@-R:Type -> @cs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.NetCmd> -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Unit>

Sends host commands, in order.

def Machine.to_net.one source · line 278 · raw

@-R:Type -> @done:Bool -> @+d:0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev -> @fs:List<&2, List<&2, U32>> -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>

The device after a delivery: frames go to the first net device (when done is False and d is one).

def Machine.to_net source · line 287 · raw

@-R:Type -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @+fs:List<&2, List<&2, U32>> -> @done:Bool -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>>

Delivers frames for the guest to the first net device of the list; done tells whether an earlier device took them. No frames, no change.

def Machine.slirp source · line 300 · raw

@-R:Type -> @p:0x6612f1a246de4bc93112c7667cc9966a/src/arm64/psci.PsciState -> @u:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl011.Pl011 -> @ui:Bool -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @lines:List<&2, Bool> -> @rt:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl031.Pl031 -> @ri:Bool -> @fl:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pflash.Pflash -> @o:0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.SlirpOut -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

Applies a NAT step: the new NAT state, its frames delivered to the first net device, its host commands as VmNet, in order.

def Machine.guest_frame.join source · line 308 · raw

@fs:List<&2, List<&2, U32>> -> @cs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.NetCmd> -> @o:0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.SlirpOut -> 0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.SlirpOut

def Machine.guest_frame source · line 315 · raw

@o:0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.SlirpOut -> @f:List<&2, U32> -> 0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.SlirpOut

One more frame from the guest through the NAT, its answers and commands after the earlier ones.

def Machine.guest_frames source · line 321 · raw

@n:0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.Slirp -> @fs:List<&2, List<&2, U32>> -> 0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.SlirpOut

Frames from the guest through the NAT, in order.

def Machine.vsock_cmds source · line 325 · raw

@-R:Type -> @cs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.VsockCmd> -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Unit>

Vsock commands for the host, in order.

def Machine.virtio_frames source · line 336 · raw

@-R:Type -> @none:Bool -> @p:0x6612f1a246de4bc93112c7667cc9966a/src/arm64/psci.PsciState -> @u:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl011.Pl011 -> @ui:Bool -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @lines:List<&2, Bool> -> @rt:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl031.Pl031 -> @ri:Bool -> @nt:0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.Slirp -> @fl:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pflash.Pflash -> @fs:List<&2, List<&2, U32>> -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

Transmitted frames through the NAT; none (most virtio writes) leave it as it is, without a pass over the devices.

def Machine.virtio_wrote source · line 345 · raw

@-R:Type -> @p:0x6612f1a246de4bc93112c7667cc9966a/src/arm64/psci.PsciState -> @u:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl011.Pl011 -> @ui:Bool -> @lines:List<&2, Bool> -> @rt:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl031.Pl031 -> @ri:Bool -> @nt:0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.Slirp -> @fl:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pflash.Pflash -> @w:Wrote -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

After a virtio write: hvc0 bytes to the console, vsock commands to the host, transmitted frames through the NAT.

def Machine.dev_write source · line 354 · raw

@-R:Type -> @n:Nat -> @m:Machine -> @off:U32 -> @v:U32 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

The 32-bit write of v to bus device n at off.

def Machine.put source · line 366 · raw

@-R:Type -> @xzr:Bool -> @r:U32 -> @v:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Unit>

Sets register r unless it is 31 (XZR).

def Machine.put_reg source · line 373 · raw

@-R:Type -> @+r:U32 -> @v:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Unit>

def Machine.mask source · line 377 · raw

@+size:U32 -> U32

The bits of an access of size bytes, within 32 bits.

def Machine.extend source · line 382 · raw

@+v:U32 -> @+size:U32 -> @sse:Bool -> @+sf:Bool -> 0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64

The loaded value: v masked to size bytes, then, when sse is set, sign- extended from size*8 bits to 64 bits (sf) or 32 bits (not sf).

def Machine.access_name source · line 389 · raw

@write:Bool -> String

def Machine.unmapped source · line 397 · raw

@write:Bool -> @m:Machine -> @ipa:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @size:U32 -> @+srt:U32 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

An access no device holds: reads give 0, writes are dropped.

def Machine.read_lines source · line 407 · raw

@-R:Type -> @lines:Bool -> @+m:Machine -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

The lines after a read: a UART read (lines true) can lower its interrupt; a virtio register read changes no line, so the pass is skipped.

def Machine.loaded source · line 415 · raw

@r:Pair(Machine, U32) -> @+size:U32 -> @srt:U32 -> @sse:Bool -> @sf:Bool -> @lines:Bool -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

A device read has happened: the register, the lines, the PC.

def Machine.access source · line 424 · raw

@write:Bool -> @+n:Nat -> @m:Machine -> @off:U32 -> @size:U32 -> @srt:U32 -> @value:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @sse:Bool -> @sf:Bool -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

def Machine.route source · line 436 · raw

@hit:Maybe<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/layout.Hit> -> @m:Machine -> @ipa:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @write:Bool -> @size:U32 -> @srt:U32 -> @value:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @sse:Bool -> @sf:Bool -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

def Machine.rtc_read.fin source · line 445 · raw

@p:0x6612f1a246de4bc93112c7667cc9966a/src/arm64/psci.PsciState -> @u:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl011.Pl011 -> @ui:Bool -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @lines:List<&2, Bool> -> @ri:Bool -> @nt:0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.Slirp -> @fl:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pflash.Pflash -> @r:Pair(0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl031.Pl031, U32) -> Pair(Machine, U32)

def Machine.rtc_read source · line 450 · raw

@m:Machine -> @off:U32 -> @now:U32 -> Pair(Machine, U32)

def Machine.rtc_write source · line 455 · raw

@m:Machine -> @off:U32 -> @v:U32 -> @now:U32 -> Machine

def Machine.rtc_loaded source · line 461 · raw

@r:Pair(Machine, U32) -> @+size:U32 -> @srt:U32 -> @sse:Bool -> @sf:Bool -> @+now:U32 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

An RTC read has happened: the register, the lines, the PC.

def Machine.rtc_access source · line 471 · raw

@write:Bool -> @m:Machine -> @off:U32 -> @size:U32 -> @srt:U32 -> @value:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @sse:Bool -> @sf:Bool -> @+now:U32 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

An RTC access at off, at time now.

def Machine.rtc_hit source · line 482 · raw

@+ipa:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> Maybe<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/layout.Hit>

def Machine.decode source · line 486 · raw

@rtc:Maybe<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/layout.Hit> -> @m:Machine -> @ipa:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @write:Bool -> @size:U32 -> @srt:U32 -> @value:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @sse:Bool -> @sf:Bool -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

The RTC access when it holds ipa, else the bus.

def Machine.with_flash source · line 499 · raw

@m:Machine -> @fl:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pflash.Pflash -> Machine

def Machine.flash_of source · line 504 · raw

@m:Machine -> 0x6612f1a246de4bc93112c7667cc9966a/src/dev/pflash.Pflash

def Machine.flash_cmds source · line 510 · raw

@-R:Type -> @cs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.FlashCmd> -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Unit>

Runs flash commands in order.

def Machine.flash_wrote source · line 519 · raw

@m:Machine -> @o:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pflash.PfOut -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

def Machine.flash_value source · line 529 · raw

@-R:Type -> @r:Maybe<&2, U32> -> @off:U32 -> @size:U32 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, U32>

A read in read-array mode reaches the host's bytes; any other mode answers its register.

def Machine.flash_access source · line 536 · raw

@write:Bool -> @m:Machine -> @+off:U32 -> @+size:U32 -> @srt:U32 -> @value:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @sse:Bool -> @sf:Bool -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

def Machine.flash_hit source · line 549 · raw

@+ipa:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> Maybe<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/layout.Hit>

def Machine.decode.flash source · line 553 · raw

@flash:Maybe<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/layout.Hit> -> @m:Machine -> @+ipa:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @write:Bool -> @size:U32 -> @srt:U32 -> @value:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @sse:Bool -> @sf:Bool -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

The flash access when bank 1 holds ipa, else the RTC or the bus.

def Machine.mmio source · line 560 · raw

@m:Machine -> @ipa:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @write:Bool -> @size:U32 -> @srt:U32 -> @value:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @sse:Bool -> @sf:Bool -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

def Machine.psci.effect source · line 566 · raw

@e:0x6612f1a246de4bc93112c7667cc9966a/src/arm64/psci.PsciEffect -> @m:Machine -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

def Machine.psci.fin source · line 585 · raw

@r:0x6612f1a246de4bc93112c7667cc9966a/src/arm64/psci.PsciResult -> @u:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl011.Pl011 -> @ui:Bool -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @lines:List<&2, Bool> -> @rt:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pl031.Pl031 -> @ri:Bool -> @nt:0x6612f1a246de4bc93112c7667cc9966a/src/net/nat.Slirp -> @fl:0x6612f1a246de4bc93112c7667cc9966a/src/dev/pflash.Pflash -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

def Machine.psci source · line 593 · raw

@cpu:U32 -> @m:Machine -> @x0:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @x1:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @x2:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @x3:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

A PSCI call (HVC #0, or any SMC) from cpu.

def Machine.hvc source · line 598 · raw

@zero:Bool -> @cpu:U32 -> @m:Machine -> @x0:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @x1:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @x2:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @x3:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

def Machine.fail source · line 608 · raw

@m:Machine -> @msg:String -> @code:U32 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

Logs a line and stops the VM with code.

def Machine.trap source · line 613 · raw

@cpu:U32 -> @m:Machine -> @t:0x6612f1a246de4bc93112c7667cc9966a/src/arm64/esr.Trap -> @x0:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @x1:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @x2:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> @x3:0x6612f1a246de4bc93112c7667cc9966a/src/lib/u64.U64 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<Step, Step>

def Machine.on_exit source · line 641 · raw

@cpu:U32 -> @m:Machine -> @e:0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.RawExit -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Vm<Step>

def Machine.uart_room source · line 653 · raw

@m:Machine -> Nat

How many bytes of console input the UART's receive FIFO takes now.

def Machine.devs_input source · line 659 · raw

@-R:Type -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @+bytes:List<&2, U32> -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>>

Console input to every device (D.Dev.input: console devices take it).

def Machine.input.go source · line 669 · raw

@-R:Type -> @m:Machine -> @+bytes:List<&2, U32> -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

def Machine.input source · line 679 · raw

@m:Machine -> @bytes:List<&2, U32> -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Vm<Machine>

Bytes typed on the host console: queued in the UART (Uart.Pl011.push_rx) and given to every ConsoleKind device (D.Dev.input), then the interrupt lines are updated as after a device access.

def Machine.net_event.go source · line 682 · raw

@-R:Type -> @m:Machine -> @ev:0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.NetEvent -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

def Machine.net_event source · line 692 · raw

@m:Machine -> @ev:0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.NetEvent -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Vm<Machine>

A network event from the host: Slirp.host_event, its frames delivered to the first NetKind device, its commands as VmNet, in order, then the interrupt lines are updated as after a device access.

def Machine.backlog source · line 697 · raw

@devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> U32

The frames pending for the guest in the first of the devices that is a NetKind device; 0 when there is none.

def Machine.big source · line 704 · raw

@ds:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> Bool

def Machine.net_big source · line 713 · raw

@m:Machine -> Bool

Whether the first NetKind device takes TCP segments of up to 64 KiB (host frames, so host data comes as V.TcpReady): see D.Dev.big.

def Machine.net_show source · line 723 · raw

@+m:Machine -> String

The frames pending for the guest in the NetKind device (0 when there is none), plus the NAT's queued bytes in 1460-byte segments: what the host's readers wait on. The NAT's connections as text (the control socket's net command), with the frames pending for the guest.

def Machine.net_backlog source · line 728 · raw

@m:Machine -> U32

def Machine.vsock_devs.out source · line 733 · raw

@-R:Type -> @o:0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.DevOut -> @t:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>>

def Machine.vsock_index source · line 741 · raw

@devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> Nat

The index of the first VsockKind device (the list's length when none).

def Machine.vsock_at source · line 749 · raw

@-R:Type -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @n:Nat -> @ev:0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.VsockEvent -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>>

A vsock event to device n of the list (no change past its end).

def Machine.vsock_devs source · line 764 · raw

@-R:Type -> @+devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @ev:0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.VsockEvent -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>>

A vsock event from the host: to the first VsockKind device, its commands to the host, then the interrupt lines.

def Machine.vsock_event.go source · line 767 · raw

@-R:Type -> @m:Machine -> @ev:0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.VsockEvent -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

def Machine.vsock_event source · line 774 · raw

@m:Machine -> @ev:0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.VsockEvent -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Vm<Machine>

def Machine.vsock_backlog.of source · line 777 · raw

@devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> U32

def Machine.vsock_backlog source · line 785 · raw

@m:Machine -> U32

The vsock device's backlog (D.Dev.vsock_backlog), for host backpressure.

def Machine.devs_hid source · line 792 · raw

@-R:Type -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @+ev:0x6612f1a246de4bc93112c7667cc9966a/src/virtio/input.Hid -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>>

A keyboard or pointer report to every device (D.Dev.hid: input devices take it).

def Machine.hid.go source · line 802 · raw

@-R:Type -> @m:Machine -> @ev:0x6612f1a246de4bc93112c7667cc9966a/src/virtio/input.Hid -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

def Machine.hid source · line 812 · raw

@m:Machine -> @ev:0x6612f1a246de4bc93112c7667cc9966a/src/virtio/input.Hid -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Vm<Machine>

A key, pointer move or button from the host's window: given to every InputKind device (D.Dev.hid), then the interrupt lines are updated as after a device access.

def Machine.devs_lan source · line 817 · raw

@-R:Type -> @devs:List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev> -> @+len:U32 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, List<&2, 0x6612f1a246de4bc93112c7667cc9966a/src/virtio/device.Dev>>

A frame of len bytes the host holds for the LAN NIC, to every device (D.Dev.lan_ready: the LanKind device takes it).

def Machine.lan.go source · line 827 · raw

@-R:Type -> @m:Machine -> @len:U32 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Op<R, Machine>

def Machine.lan source · line 837 · raw

@m:Machine -> @len:U32 -> 0x6612f1a246de4bc93112c7667cc9966a/src/vmm/abi.Vm<Machine>

The host holds a LAN frame of len bytes for the guest (V.LanSend from another VM): delivered to the LAN NIC's receive queue, then the interrupt lines are updated as after a device access.