Constants§
- MAX_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.
- MAX_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_ ALLOCATOR_ OFFSET - SCRATCH_
TOP_ EXN_ STACK_ OFFSET - SCRATCH_
TOP_ SIZE_ OFFSET - SCRATCH_
TOP_ SNAPSHOT_ PT_ GPA_ BASE_ OFFSET - SNAPSHOT_
PT_ GVA_ MAX - SNAPSHOT_
PT_ GVA_ MIN
Functions§
- min_
scratch_ size - Compute the minimum scratch region size needed for a sandbox. On amd64, this is:
- scratch_
base_ gpa - scratch_
base_ gva