Structs§
- Queue
Dims - Validated address independent dimensions for one transport queue.
- Transport
Arena - Addresses of both rings, the checkpoint mailbox, and pools in one fixed arena.
Constants§
- SCRATCH_
TOP_ ALLOCATOR_ OFFSET - SCRATCH_
TOP_ EXN_ STACK_ OFFSET - SCRATCH_
TOP_ G2H_ BUFFER_ SIZE_ OFFSET - SCRATCH_
TOP_ G2H_ POOL_ PAGES_ OFFSET - SCRATCH_
TOP_ G2H_ QUEUE_ SIZE_ OFFSET - SCRATCH_
TOP_ GPA - We assume 36-bit IPAs for now, since every amd64 processor supports at least 36 bits. Almost all of them support at least 40 bits, so we could consider bumping this in the future if we were ever memory-constrained.
- SCRATCH_
TOP_ GUEST_ LOG_ LEVEL_ OFFSET - SCRATCH_
TOP_ GVA - We have this the top of the page below the top of memory in order to make working with start/end ptrs in a few places more convenient (not needing to worry about overflow)
- SCRATCH_
TOP_ H2G_ BUFFER_ SIZE_ OFFSET - SCRATCH_
TOP_ H2G_ POOL_ PAGES_ OFFSET - SCRATCH_
TOP_ H2G_ QUEUE_ SIZE_ OFFSET - SCRATCH_
TOP_ HEAP_ EXECUTABLE_ OFFSET - SCRATCH_
TOP_ LIBC_ RNG_ SEED_ OFFSET - SCRATCH_
TOP_ RESERVED_ PAGES - Pages reserved for the exception stack and scratch-top metadata.
- SCRATCH_
TOP_ SIZE_ OFFSET - SCRATCH_
TOP_ SNAPSHOT_ GENERATION_ OFFSET - SCRATCH_
TOP_ SNAPSHOT_ PT_ GPA_ BASE_ OFFSET - SCRATCH_
TOP_ TRANSPORT_ ARENA_ GPA_ OFFSET - SCRATCH_
TRANSPORT_ GAP_ PAGES - Unmapped pages between the transport arena and the reserved top pages. On amd64 an exception stack overrun faults in them before it reaches the arena. aarch64 exception vectors lower SP before their first store, so nested faults there can step past them.
- SNAPSHOT_
PT_ GVA_ MAX - SNAPSHOT_
PT_ GVA_ MIN - VIRTQ_
BUFFER_ GVA_ END - VIRTQ_
BUFFER_ GVA_ START
Functions§
- io_page
- min_
scratch_ size - Compute fixed scratch overhead for a sandbox, saturating at
usize::MAX. - scratch_
base_ gpa - scratch_
base_ gva - scratch_
reserved_ top_ gpa - Start of the reserved pages at the top of scratch. The transport arena
sits
SCRATCH_TRANSPORT_GAP_PAGESbelow it. A guest’s page allocator stops at the arena GPA the host publishes. - scratch_
reserved_ top_ gva scratch_reserved_top_gpain the scratch mapping.- scratch_
transport_ end_ gpa - Exclusive end of the transport arena: the reserved top pages, less the guard pages between them.
- scratch_
transport_ end_ gva scratch_transport_end_gpain the scratch mapping.