Skip to main content

Module layout

Module layout 

Source

Structs§

QueueDims
Validated address independent dimensions for one transport queue.
TransportArena
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_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
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_allocator_limit_gpa
Exclusive upper GPA boundary for dynamic scratch allocations.
scratch_base_gpa
scratch_base_gva