Skip to main content

Crate rvm_memory

Crate rvm_memory 

Source
Expand description

§RVM Memory Manager

Guest physical address space management for the RVM microhypervisor, as specified in ADR-136 and ADR-138. Provides a safe abstraction over four-tier coherence-driven memory with reconstruction capability.

§Four-Tier Memory Model (ADR-136)

TierNameDescription
0HotPer-core SRAM / L1-adjacent; always resident during execution
1WarmShared DRAM; resident if residency rule is met
2DormantCompressed checkpoint + delta; reconstructed on demand
3ColdPersistent archival; accessed only during recovery

§Key Components

§Design Constraints

  • #![no_std] with zero heap allocation
  • #![forbid(unsafe_code)]
  • Works without the coherence engine (DC-1 static fallback thresholds)
  • All tier transitions are explicit, not demand-paged

Re-exports§

pub use allocator::BuddyAllocator;
pub use reconstruction::create_checkpoint;
pub use reconstruction::CheckpointId;
pub use reconstruction::CompressedCheckpoint;
pub use reconstruction::ReconstructionPipeline;
pub use reconstruction::ReconstructionResult;
pub use reconstruction::WitnessDelta;
pub use region::AddressMapping;
pub use region::OwnedRegion;
pub use region::RegionConfig;
pub use region::RegionManager;
pub use tier::RegionTierState;
pub use tier::Tier;
pub use tier::TierManager;
pub use tier::TierThresholds;

Modules§

allocator
Buddy allocator for physical page allocation (ADR-136).
reconstruction
Dormant state reconstruction pipeline (ADR-136).
region
Region management for guest physical address space (ADR-136, ADR-138).
tier
Memory tier management per ADR-136.

Structs§

MemoryPermissions
Access permissions for a memory mapping.
MemoryRegion
A legacy memory region descriptor (ADR-138 compatibility).

Constants§

PAGE_SIZE
Page size in bytes (4 KiB).

Functions§

regions_overlap
Check whether two memory regions overlap in guest physical space.
regions_overlap_host
Check whether two memory regions overlap in host physical space.
validate_region
Validate that a memory region descriptor is well-formed.