src/virtio/device.bend checks
raw source on the hub · import 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/device.bend as Device
16 imports
import Base import ../lib/u64.bend as U import ../lib/bytes.bend as B import ../vmm/abi.bend as V import ./mmio.bend as M import ./queue.bend as Q import ./rng.bend as Rng import ./blk.bend as Blk import ../disk/store.bend as St import ./console.bend as Con import ./net.bend as N import ../fs/p9.bend as P import ./vsock.bend as Vs import ./input.bend as In import ./lan.bend as Ln import ./balloon.bend as Bl
Types
type DevKind source · line 68 · raw
Data
RngKindDevKind
BlkKind@disk:U32 -> @sectors:0xcc60967bebc4a874a86f388a1bbb7c9c/src/lib/u64.U64 -> DevKind
BlkRoKind@disk:U32 -> @sectors:0xcc60967bebc4a874a86f388a1bbb7c9c/src/lib/u64.U64 -> DevKind
BlkStoreKind@store:0xcc60967bebc4a874a86f388a1bbb7c9c/src/disk/store.Store -> @sectors:0xcc60967bebc4a874a86f388a1bbb7c9c/src/lib/u64.U64 -> @ro:Bool -> DevKind
A virtio-blk over a store (a qcow2 image over its backing files), read-only when ro.
ConsoleKindDevKind
NetKind@mac:List<&2, U32> -> DevKind
P9Kind@share:U32 -> @tag:String -> DevKind
VsockKind@cid:0xcc60967bebc4a874a86f388a1bbb7c9c/src/lib/u64.U64 -> DevKind
InputKind@tablet:Bool -> DevKind
LanKind@mac:List<&2, U32> -> @ip:U32 -> @prefix:U32 -> DevKind
virtio-net on a host LAN (src/virtio/lan.bend): its MAC, and the address its DHCP answers give (ip 0: none) with its prefix length.
BalloonKindDevKind
virtio-balloon with free page reporting (src/virtio/balloon.bend).
type DevState source · line 87 · raw
Data
The per-kind state of a device.
NoStateDevState
ConState@input:List<&2, U32> -> DevState
Console input not yet delivered.
NetState@frames:List<&2, List<&2, U32>> -> DevState
Frames for the guest not yet delivered, oldest first.
P9Dev@p9:0xcc60967bebc4a874a86f388a1bbb7c9c/src/fs/p9.P9State -> DevState
VsState@vs:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/vsock.Vsock -> DevState
InDev@input:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/input.InputState -> DevState
LanDev@lan:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/lan.Lan -> DevState
BalDev@bal:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/balloon.Bal -> DevState
The balloon's target, count and partly inflated blocks.
type Dev source · line 100 · raw
Data
Dev@kind:DevKind -> @mmio:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @queues:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @state:DevState -> Dev
type DevOut source · line 105 · raw
Data
The device after a write, the bytes the guest wrote to hvc0 and the frames the guest transmitted, in order.
DevOut@dev:Dev -> @console:List<&2, U32> -> @frames:List<&2, List<&2, U32>> -> @vsock:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.VsockCmd> -> DevOut
type Pass source · line 313 · raw
Data
What a pass on one queue did: the queue, the new state, the bytes for the host console, the frames for the host, and whether it used any chain.
Pass@q:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq -> @state:DevState -> @console:List<&2, U32> -> @frames:List<&2, List<&2, U32>> -> @vsock:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.VsockCmd> -> @used:Bool -> Pass
Definitions
def Dev.features source · line 109 · raw
0xcc60967bebc4a874a86f388a1bbb7c9c/src/lib/u64.U64
VIRTIO_F_VERSION_1: bit 32, so bit 0 of the high word (the rng features).
def Dev.max_frames source · line 113 · raw
Nat
The most frames a net device keeps for the guest.
def Dev.mmio source · line 117 · raw
@kind:DevKind -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio
The transport of a fresh device of the given kind.
def Dev.state source · line 143 · raw
@kind:DevKind -> DevState
The state of a fresh device of the given kind.
def Dev.new source · line 168 · raw
@kind:DevKind -> Dev
def Dev.read.fin source · line 172 · raw
@k:DevKind -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @st:DevState -> @r:Pair(0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio, U32) -> Pair(Dev, U32)
def Dev.read source · line 177 · raw
@d:Dev -> @off:U32 -> @size:U32 -> Pair(Dev, U32)
def Dev.build source · line 183 · raw
@cs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.QueueCfg> -> List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq>
One Q.Vq per queue configuration, in order.
def Dev.cfgs source · line 190 · raw
@m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.QueueCfg>
def Dev.qget source · line 196 · raw
@qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @+i:U32 -> @+sel:U32 -> Maybe<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq>
Queue sel of the list; i counts the list position.
def Dev.qput source · line 204 · raw
@qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @+i:U32 -> @+sel:U32 -> @+q:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq -> List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq>
Replaces queue sel of the list by q; i counts the list position.
def Dev.raise_if source · line 212 · raw
@used:Bool -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio
Raises the used-buffer interrupt (status bit 1) when used.
def Dev.process source · line 222 · raw
@-R:Type -> @k:DevKind -> @q:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Pair(0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq, Bool)>
Runs the process of a kind without state on a queue. The kinds with state (console, net, 9p) run their passes in Dev.pass instead; here they use no chain.
def Dev.input_of source · line 248 · raw
@st:DevState -> List<&2, U32>
The pending console input of a state (none for other kinds).
def Dev.frames_of source · line 268 · raw
@st:DevState -> List<&2, List<&2, U32>>
The pending frames of a state (none for other kinds).
def Dev.p9_of source · line 288 · raw
@st:DevState -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/fs/p9.P9State
The 9p server state of a state (a fresh one for other kinds).
def Dev.cap source · line 308 · raw
@+fs:List<&2, List<&2, U32>> -> List<&2, List<&2, U32>>
The last Dev.max_frames() frames.
def Dev.pass.plain source · line 316 · raw
@st:DevState -> @r:Pair(0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq, Bool) -> Pass
def Dev.pass.con_tx source · line 321 · raw
@st:DevState -> @r:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/console.ConTx -> Pass
def Dev.pass.con_rx source · line 326 · raw
@r:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/console.ConRx -> Pass
def Dev.pass.net_tx source · line 331 · raw
@st:DevState -> @r:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/net.NetTx -> Pass
def Dev.pass.net_rx source · line 336 · raw
@r:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/net.NetRx -> Pass
def Dev.pass.p9 source · line 341 · raw
@r:0xcc60967bebc4a874a86f388a1bbb7c9c/src/fs/p9.P9Pass -> Pass
def Dev.pass.con source · line 347 · raw
@-R:Type -> @tx:Bool -> @st:DevState -> @q:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Pass>
The console's pass: transmitq0 (tx) or receiveq0.
def Dev.pass.net source · line 359 · raw
@-R:Type -> @tx:Bool -> @st:DevState -> @q:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Pass>
The net device's pass: transmitq1 (tx) or receiveq1.
def Dev.vs_of source · line 371 · raw
@st:DevState -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/vsock.Vsock
The vsock state of a state (a fresh one, CID 3, for other kinds).
def Dev.pass.vs_tx source · line 390 · raw
@r:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/vsock.VsTx -> Pass
def Dev.pass.vs_rx source · line 395 · raw
@r:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/vsock.VsRx -> Pass
def Dev.pass.vsock source · line 402 · raw
@-R:Type -> @tx:Bool -> @rx:Bool -> @st:DevState -> @q:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Pass>
The vsock device's pass: tx (queue 1), rx (queue 0); the event queue (2) is never used.
def Dev.in_of source · line 416 · raw
@st:DevState -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/input.InputState
The input state of a state (a fresh one for other kinds).
def Dev.pass.in_rx source · line 423 · raw
@r:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/input.InRx -> Pass
def Dev.pass.in_status source · line 428 · raw
@st:DevState -> @r:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/console.ConTx -> Pass
def Dev.pass.input source · line 435 · raw
@-R:Type -> @ev:Bool -> @st:DevState -> @q:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Pass>
The input device's pass: eventq (ev) gets the pending events; statusq chains are taken and dropped.
def Dev.lan_of source · line 447 · raw
@st:DevState -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/lan.Lan
The LAN state of a state (a blank one for other kinds).
def Dev.bal_of source · line 455 · raw
@st:DevState -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/balloon.Bal
The balloon's state (a fresh one for a snapshot taken before it had one).
def Dev.pass.bal source · line 462 · raw
@r:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/balloon.BalPass -> Pass
def Dev.pass.lan_tx source · line 467 · raw
@r:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/lan.LanTx -> Pass
def Dev.pass.lan_rx source · line 472 · raw
@l:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/lan.Lan -> @r:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/lan.LanRxOut -> Pass
def Dev.pass.lan source · line 478 · raw
@-R:Type -> @tx:Bool -> @st:DevState -> @q:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Pass>
The LAN device's pass: transmit (queue 1) or receive (queue 0).
def Dev.pass source · line 491 · raw
@-R:Type -> @k:DevKind -> @st:DevState -> @+sel:U32 -> @q:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Pass>
Runs the kind's pass on queue sel (q).
def Dev.out source · line 529 · raw
@d:Dev -> DevOut
A device with nothing for the host.
def Dev.notify.fin source · line 532 · raw
@k:DevKind -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @sel:U32 -> @r:Pass -> DevOut
def Dev.notify source · line 538 · raw
@-R:Type -> @mq:Maybe<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @+k:DevKind -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @st:DevState -> @+sel:U32 -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, DevOut>
Runs the pass on queue sel when it exists.
def DevOut.dev source · line 548 · raw
@o:DevOut -> Dev
Acts on the event of a transport write.
def Dev.flush source · line 553 · raw
@-R:Type -> @k:DevKind -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @st:DevState -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Dev>
def Dev.flush.out source · line 560 · raw
@-R:Type -> @k:DevKind -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @st:DevState -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, DevOut>
The rx pass (Dev.flush) with its vsock commands kept (VsRelease).
def DevOut.join source · line 564 · raw
@bs:List<&2, U32> -> @fs:List<&2, List<&2, U32>> -> @vc:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.VsockCmd> -> @o:DevOut -> DevOut
def Dev.after.vsock source · line 569 · raw
@-R:Type -> @again:Bool -> @o:DevOut -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, DevOut>
def Dev.is_vsock source · line 580 · raw
@k:DevKind -> Bool
def Dev.is_lan source · line 587 · raw
@k:DevKind -> Bool
def Dev.on_event source · line 594 · raw
@-R:Type -> @ev:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.MmioEvent -> @k:DevKind -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @st:DevState -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, DevOut>
def Dev.write.fin source · line 610 · raw
@-R:Type -> @k:DevKind -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @st:DevState -> @r:Pair(0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.MmioEvent) -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, DevOut>
def Dev.is_input source · line 615 · raw
@k:DevKind -> Bool
def Dev.tablet_of source · line 622 · raw
@k:DevKind -> Bool
def Dev.write.go source · line 631 · raw
@-R:Type -> @select:Bool -> @+k:DevKind -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @st:DevState -> @+off:U32 -> @v:U32 -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, DevOut>
A write to an input device's select or subsel byte rebuilds its config space; other writes go to the transport.
def Dev.write source · line 639 · raw
@-R:Type -> @d:Dev -> @+off:U32 -> @v:U32 -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, DevOut>
def Dev.is_console source · line 646 · raw
@k:DevKind -> Bool
Delivers a device's pending input or frames into its queue 0, when it exists.
def Dev.is_net source · line 671 · raw
@k:DevKind -> Bool
def Dev.input.go source · line 696 · raw
@-R:Type -> @console:Bool -> @k:DevKind -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @st:DevState -> @bytes:List<&2, U32> -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Dev>
def Dev.input source · line 706 · raw
@-R:Type -> @d:Dev -> @bytes:List<&2, U32> -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Dev>
Bytes typed on the host console: a console device appends them to its pending input and delivers what fits into receiveq0 (raising interrupt status bit 1 when it used a chain). Other kinds are unchanged.
def Dev.deliver.go source · line 711 · raw
@-R:Type -> @net:Bool -> @k:DevKind -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @st:DevState -> @frames:List<&2, List<&2, U32>> -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Dev>
def Dev.deliver source · line 722 · raw
@-R:Type -> @d:Dev -> @frames:List<&2, List<&2, U32>> -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Dev>
Frames for the guest: a net device appends them to its pending frames (keeping the last Dev.max_frames()) and delivers what it can into receiveq1 (raising interrupt status bit 1 when it used a chain). Other kinds are unchanged.
def Dev.net source · line 728 · raw
@d:Dev -> Bool
Whether the device is a net device.
def Dev.backlog source · line 734 · raw
@d:Dev -> U32
The number of frames a net device holds for the guest (0 for other kinds).
def Dev.vsock source · line 740 · raw
@d:Dev -> Bool
Whether the device is a vsock device.
def Dev.big.mmio source · line 745 · raw
@m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> Bool
def Dev.big source · line 752 · raw
@d:Dev -> Bool
Whether a net device's driver took GUEST_CSUM and GUEST_TSO4 (bits 1 and 7): it then receives TCP segments of up to 64 KiB as host frames.
def Dev.vsock_backlog source · line 758 · raw
@d:Dev -> U32
A vsock device's backlog (Vs.Vsock.backlog; 0 for other kinds).
def Dev.host_vsock.fin source · line 763 · raw
@-R:Type -> @k:DevKind -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @o:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/vsock.VsOut -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, DevOut>
def Dev.host_vsock source · line 772 · raw
@-R:Type -> @d:Dev -> @ev:0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.VsockEvent -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, DevOut>
An event from the host's vsock sockets: through the protocol, then the packets it queued go into the rx queue. Other kinds are unchanged.
def Dev.irq source · line 779 · raw
@d:Dev -> Bool
After a vsock tx pass, the replies it queued go out through the rx queue. The interrupt line's level.
def Dev.hid.go source · line 784 · raw
@-R:Type -> @input:Bool -> @+k:DevKind -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @st:DevState -> @ev:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/input.Hid -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Dev>
def Dev.hid source · line 794 · raw
@-R:Type -> @d:Dev -> @ev:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/input.Hid -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Dev>
A keyboard or pointer report from the host: an input device queues its events (In.Input.push: the keyboard takes keys, the tablet moves and buttons) and delivers what fits into eventq. Other kinds are unchanged.
def Dev.lan_ready.go source · line 799 · raw
@-R:Type -> @lan:Bool -> @k:DevKind -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @st:DevState -> @+len:U32 -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Dev>
def Dev.lan_ready source · line 809 · raw
@-R:Type -> @d:Dev -> @+len:U32 -> 0xcc60967bebc4a874a86f388a1bbb7c9c/src/vmm/abi.Op<R, Dev>
The host holds a frame of len bytes for the LAN NIC: a LAN device queues it and delivers what fits into its receive queue (raising interrupt status bit 1 when it used a chain). Other kinds are unchanged.
def Dev.forget_lan source · line 815 · raw
@d:Dev -> Dev
The LAN state of a device (forget_held after a restore).
def Dev.balloon.go source · line 825 · raw
@bal:Bool -> @+k:DevKind -> @m:0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/mmio.VirtioMmio -> @qs:List<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/queue.Vq> -> @st:DevState -> @+pages:U32 -> Dev
The host sets the balloon's target (balloon MiB on the control socket):
a balloon device takes it (pages of 4 KiB) and tells the driver (config
change interrupt); other kinds are unchanged.
def Dev.is_balloon source · line 833 · raw
@k:DevKind -> Bool
def Dev.balloon source · line 840 · raw
@d:Dev -> @+pages:U32 -> Dev
def Dev.balloon_info source · line 846 · raw
@d:Dev -> Maybe<&2, 0xcc60967bebc4a874a86f388a1bbb7c9c/src/virtio/balloon.Bal>
The balloon's target and count (4 KiB pages), when this is the balloon.