src/virtio/balloon.bend checks
raw source on the hub · import 0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/balloon.bend as Balloon
5 imports
import Base import ../lib/u64.bend as U import ../lib/bytes.bend as B import ../vmm/abi.bend as V import ./queue.bend as Q
Definitions
def Balloon.features source · line 24 · raw
0x5d8f2af4bacb57815fa6a96a49bd679a/src/lib/u64.U64
def Balloon.queues source · line 27 · raw
Nat
def Balloon.report_queue source · line 30 · raw
U32
def Balloon.config source · line 33 · raw
List<&2, U32>
def Balloon.align source · line 38 · raw
U32
The release granule: 64 KiB covers the host page sizes in use (4, 16 and 64 KiB).
def Balloon.inside source · line 43 · raw
@+addr:0x5d8f2af4bacb57815fa6a96a49bd679a/src/lib/u64.U64 -> @+len:U32 -> 0x5d8f2af4bacb57815fa6a96a49bd679a/src/vmm/abi.Iov
The whole granules inside [addr, addr+len): none (len 0) when there are none.
def Balloon.len source · line 48 · raw
@+i:0x5d8f2af4bacb57815fa6a96a49bd679a/src/vmm/abi.Iov -> U32
def Balloon.ranges source · line 54 · raw
@ds:List<&2, 0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Desc> -> List<&2, 0x5d8f2af4bacb57815fa6a96a49bd679a/src/vmm/abi.Iov>
The granules of every descriptor of a buffer, the empty ones dropped.
def Balloon.free source · line 65 · raw
@-R:Type -> @go:Bool -> @+rs:List<&2, 0x5d8f2af4bacb57815fa6a96a49bd679a/src/vmm/abi.Iov> -> 0x5d8f2af4bacb57815fa6a96a49bd679a/src/vmm/abi.Op<R, Unit>
def Balloon.serve source · line 72 · raw
@-R:Type -> @release:Bool -> @q:0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Vq -> @c:0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Chain -> 0x5d8f2af4bacb57815fa6a96a49bd679a/src/vmm/abi.Op<R, 0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Vq>
def Balloon.step source · line 80 · raw
@-R:Type -> @release:Bool -> @r:Pair(0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Vq, Maybe<&2, 0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Chain>) -> @used:Bool -> @k:(@_:0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Vq -> 0x5d8f2af4bacb57815fa6a96a49bd679a/src/vmm/abi.Op<R, Pair(0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Vq, Bool)>) -> 0x5d8f2af4bacb57815fa6a96a49bd679a/src/vmm/abi.Op<R, Pair(0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Vq, Bool)>
def Balloon.go source · line 89 · raw
@fuel:Nat -> @-R:Type -> @+release:Bool -> @q:0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Vq -> @used:Bool -> 0x5d8f2af4bacb57815fa6a96a49bd679a/src/vmm/abi.Op<R, Pair(0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Vq, Bool)>
def Balloon.process source · line 100 · raw
@-R:Type -> @+sel:U32 -> @q:0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Vq -> 0x5d8f2af4bacb57815fa6a96a49bd679a/src/vmm/abi.Op<R, Pair(0x5d8f2af4bacb57815fa6a96a49bd679a/src/virtio/queue.Vq, Bool)>
Queue sel's pass: the reporting queue releases what each buffer names; the others return their buffers. At most 256 buffers per pass.