pub trait ProtoPartition {
type Partition: Partition;
type ProcessorBinder: 'static + BindProcessor + Send;
type Error: Error + Send + Sync + 'static;
// Required methods
fn max_physical_address_size(&self) -> u8;
fn build(
self,
config: PartitionConfig<'_>,
) -> Result<(Self::Partition, Vec<Self::ProcessorBinder>), Self::Error>;
// Provided method
fn supports_memory_fault_resolution(&self) -> bool { ... }
}Expand description
Trait for a prototype partition, one that is partially created but still needs final configuration.
This is separate from the partition so that it can be queried to determine the final partition configuration.
Required Associated Types§
Sourcetype ProcessorBinder: 'static + BindProcessor + Send
type ProcessorBinder: 'static + BindProcessor + Send
The VP binder type.
Required Methods§
Sourcefn max_physical_address_size(&self) -> u8
fn max_physical_address_size(&self) -> u8
The maximum physical address width that processors and devices for this partition can access.
This may be smaller than what is reported to the guest via architectural interfaces by default, and it may be larger or smaller than what the VMM ultimately chooses to report to the guest.
Sourcefn build(
self,
config: PartitionConfig<'_>,
) -> Result<(Self::Partition, Vec<Self::ProcessorBinder>), Self::Error>
fn build( self, config: PartitionConfig<'_>, ) -> Result<(Self::Partition, Vec<Self::ProcessorBinder>), Self::Error>
Constructs the full partition.
Provided Methods§
Sourcefn supports_memory_fault_resolution(&self) -> bool
fn supports_memory_fault_resolution(&self) -> bool
Whether the partition delivers guest-memory-access faults back to the
VMM and resolves them through a ResolveMemoryFault supplied in
PartitionConfig::fault_resolver.
Defaults to false. A backend that forwards memory faults to the VMM
(e.g. WHP) overrides this to true. The code assembling
PartitionConfig uses it to decide whether to supply a resolver, and
the memory backing uses it to select a lazy commit strategy.