rvm-memory
Guest physical address space management for the RVM microhypervisor.
Provides safe abstractions over stage-2 page table mappings with capability-gated access. Each partition has an independent guest physical address space. All mapping operations are recorded in the witness trail. Memory regions can be shared between partitions with explicit grants.
Key Types and Functions
MemoryRegion-- descriptor: guest base, host base, page count, permissions, ownerMemoryPermissions-- RWX permission flags with constants (READ_ONLY,READ_WRITE,READ_EXECUTE)validate_region(region)-- checks alignment, page count, and permission validityregions_overlap(a, b)-- detects overlapping regions within the same partitionPAGE_SIZE-- 4 KiB page size constant
Example
use ;
use ;
let region = MemoryRegion ;
assert!;
Design Constraints
- DC-15:
#![no_std],#![forbid(unsafe_code)],#![deny(missing_docs)] - ADR-138: capability-gated mappings; witness-logged operations
Workspace Dependencies
rvm-typesrvm-halrvm-partitionrvm-witness