pub trait Partition:
'static
+ Hv1
+ Inspect
+ Send
+ Sync {
// Required methods
fn supports_reset(
&self,
) -> Option<&dyn ResetPartition<Error = <Self as Hv1>::Error>>;
fn request_msi(&self, vtl: Vtl, request: MsiRequest);
fn caps(&self) -> &PartitionCapabilities;
fn request_yield(&self, vp_index: VpIndex);
// Provided methods
fn supports_initial_accept_pages(
&self,
) -> Option<&dyn AcceptInitialPages<Error = <Self as Hv1>::Error>> { ... }
fn supports_vtl_scrub(
&self,
) -> Option<&dyn ScrubVtl<Error = <Self as Hv1>::Error>> { ... }
fn doorbell_registration(
self: &Arc<Self>,
minimum_vtl: Vtl,
) -> Option<Arc<dyn DoorbellRegistration>> { ... }
fn msi_interrupt_target(
self: &Arc<Self>,
vtl: Vtl,
) -> Option<Arc<dyn MsiInterruptTarget>> { ... }
}
Expand description
Methods for manipulating a VM partition.
Required Methods§
sourcefn supports_reset(
&self,
) -> Option<&dyn ResetPartition<Error = <Self as Hv1>::Error>>
fn supports_reset( &self, ) -> Option<&dyn ResetPartition<Error = <Self as Hv1>::Error>>
Returns a trait object to reset the partition, if supported.
sourcefn request_msi(&self, vtl: Vtl, request: MsiRequest)
fn request_msi(&self, vtl: Vtl, request: MsiRequest)
Requests an MSI for the specified VTL.
On x86, the MSI format is the architectural APIC format.
On ARM64, the MSI format is currently not defined, since we only support Hyper-V-style VMs (which use synthetic MSIs via VPCI). In the future, we may want to support either or both SPI- and ITS+LPI-based MSIs.
sourcefn caps(&self) -> &PartitionCapabilities
fn caps(&self) -> &PartitionCapabilities
Get the partition capabilities for this partition.
sourcefn request_yield(&self, vp_index: VpIndex)
fn request_yield(&self, vp_index: VpIndex)
Forces the run_vp call to yield to the scheduler (i.e. return Poll::Pending).
Provided Methods§
sourcefn supports_initial_accept_pages(
&self,
) -> Option<&dyn AcceptInitialPages<Error = <Self as Hv1>::Error>>
fn supports_initial_accept_pages( &self, ) -> Option<&dyn AcceptInitialPages<Error = <Self as Hv1>::Error>>
Returns a trait object to accept pages on behalf of the guest during the initial start import flow.
sourcefn supports_vtl_scrub(
&self,
) -> Option<&dyn ScrubVtl<Error = <Self as Hv1>::Error>>
fn supports_vtl_scrub( &self, ) -> Option<&dyn ScrubVtl<Error = <Self as Hv1>::Error>>
Returns a trait object to reset VTL state, if supported.
sourcefn doorbell_registration(
self: &Arc<Self>,
minimum_vtl: Vtl,
) -> Option<Arc<dyn DoorbellRegistration>>
fn doorbell_registration( self: &Arc<Self>, minimum_vtl: Vtl, ) -> Option<Arc<dyn DoorbellRegistration>>
Returns an interface for registering MMIO doorbells for this partition.
Not all partitions support this.