Expand description
Common helper routines for all loaders.
Structs§
- Chunk
Buf - A page-aligned chunk buffer for streaming file data into guest memory.
- Import
File Region - Parameters for
ChunkBuf::import_file_region. - Unsupported
Mmio - Returned when the MMIO layout is not supported.
Enums§
- Import
File Region Error - Error returned by
ChunkBuf::import_file_region.
Constants§
- DEFAULT_
GDT_ SIZE - The size of the default GDT table, in bytes.
Traits§
- Read
Seek - Trait alias for
Read + Seek.
Functions§
- compute_
variable_ mtrrs - Computes the x86 variable MTRRs that describe the given memory layout. This is intended to be used to setup MTRRs for booting a guest with two mmio gaps, such as booting Linux, UEFI, or PCAT.
- import_
default_ gdt - Import a default GDT at the given address, with one page imported. The GDT is used with cs as entry 1, and data segments (ds, es, fs, gs, ss) as entry 2. Registers using the GDT are imported with vtl 0 only.