Trait virt::ProtoPartition
source · pub trait ProtoPartition {
type Partition: Partition;
type ProcessorBinder: 'static + BindProcessor + Send;
type Error: Error + Send + Sync + 'static;
// Required methods
fn cpuid(&self, eax: u32, ecx: u32) -> [u32; 4];
fn max_physical_address_size(&self) -> u8;
fn build(
self,
config: PartitionConfig<'_>,
) -> Result<(Self::Partition, Vec<Self::ProcessorBinder>), Self::Error>;
}
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 cpuid(&self, eax: u32, ecx: u32) -> [u32; 4]
fn cpuid(&self, eax: u32, ecx: u32) -> [u32; 4]
Gets the default guest cpuid value for inputs eax
and ecx
.
sourcefn max_physical_address_size(&self) -> u8
fn max_physical_address_size(&self) -> u8
The number of bits of a physical address.
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.