pub struct PartitionId(/* private fields */);Expand description
Unique identifier for a coherence partition.
Partitions are the primary isolation boundary in RVM. Each partition runs one or more vCPUs and has its own memory map, capability space, and coherence score.
The lower 8 bits serve as the hardware VMID for stage-2 TLB tagging
on AArch64 (ADR-133, Section 3). VMID 0 is reserved for the hypervisor.
Implementations§
Source§impl PartitionId
impl PartitionId
Sourcepub const HYPERVISOR: Self
pub const HYPERVISOR: Self
The hypervisor’s own partition identifier (not schedulable).
Sourcepub const MAX_LOGICAL: u32 = 4096
pub const MAX_LOGICAL: u32 = 4096
Maximum logical partition count (DC-12).
Hardware VMID space is bounded (e.g., 256 on ARM). Agent workloads can exceed this, so logical partitions are multiplexed over physical VMID slots.
Sourcepub const fn try_new(id: u32) -> Option<Self>
pub const fn try_new(id: u32) -> Option<Self>
Create a validated partition identifier, returning None for
reserved or out-of-range values.
- Rejects
0(reserved for the hypervisor – usePartitionId::HYPERVISOR). - Rejects values greater than
MAX_LOGICAL.
Sourcepub const fn hypervisor() -> Self
pub const fn hypervisor() -> Self
Return the hypervisor’s reserved partition identifier.
Sourcepub const fn vmid(self) -> u16
pub const fn vmid(self) -> u16
Extract the hardware VMID (lower 8 bits) for stage-2 TLB tagging.
On AArch64, VTTBR_EL2 encodes the VMID in bits [55:48]. Only 8 bits
are used for 256 physical VMID slots; logical partitions exceeding
this are multiplexed per DC-12.
Sourcepub const fn is_hypervisor(self) -> bool
pub const fn is_hypervisor(self) -> bool
Whether this is the hypervisor’s own partition.
Trait Implementations§
Source§impl Clone for PartitionId
impl Clone for PartitionId
Source§fn clone(&self) -> PartitionId
fn clone(&self) -> PartitionId
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more