pub struct BaseChipsetBuilder<'a> { /* private fields */ }
Expand description
A builder that kick-starts Chipset construction by instantiating a bunch of semi-standardized devices.
i.e: we’d rather not maintain two nearly-identical codepaths to instantiate these devices in both HvLite and Underhill.
Implementations§
Source§impl<'a> BaseChipsetBuilder<'a>
impl<'a> BaseChipsetBuilder<'a>
Sourcepub fn new(
foundation: BaseChipsetFoundation<'a>,
devices: BaseChipsetDevices,
) -> Self
pub fn new( foundation: BaseChipsetFoundation<'a>, devices: BaseChipsetDevices, ) -> Self
Create a new BaseChipsetBuilder
Sourcepub fn with_expected_manifest(
self,
expected_manifest: BaseChipsetManifest,
) -> Self
pub fn with_expected_manifest( self, expected_manifest: BaseChipsetManifest, ) -> Self
Double-check that the provided options::BaseChipsetDevices
has the
same devices as specified by expected_manifest
Sourcepub fn with_device_handles(
self,
device_handles: Vec<ChipsetDeviceHandle>,
) -> Self
pub fn with_device_handles( self, device_handles: Vec<ChipsetDeviceHandle>, ) -> Self
Adds device handles to be resolved and instantiated.
Sourcepub fn with_trace_unknown_pio(self, active: bool) -> Self
pub fn with_trace_unknown_pio(self, active: bool) -> Self
Emit “missing device” traces when accessing unknown port IO addresses.
Disabled by default.
Sourcepub fn with_trace_unknown_mmio(self, active: bool) -> Self
pub fn with_trace_unknown_mmio(self, active: bool) -> Self
Emit “missing device” traces when accessing unknown port MMIO addresses.
Enabled by default.
Sourcepub fn with_fallback_mmio_device(
self,
fallback_mmio_device: Option<Arc<CloseableMutex<dyn ChipsetDevice>>>,
) -> Self
pub fn with_fallback_mmio_device( self, fallback_mmio_device: Option<Arc<CloseableMutex<dyn ChipsetDevice>>>, ) -> Self
Set a fallback MMIO device to be used when no other device claims an address range.
Sourcepub async fn build(
self,
driver_source: &'a VmTaskDriverSource,
units: &'a StateUnits,
resolver: &ResourceResolver,
) -> Result<BaseChipsetBuilderOutput<'a>, BaseChipsetBuilderError>
pub async fn build( self, driver_source: &'a VmTaskDriverSource, units: &'a StateUnits, resolver: &ResourceResolver, ) -> Result<BaseChipsetBuilderOutput<'a>, BaseChipsetBuilderError>
Create a new base chipset. Returns a ChipsetBuilder
which can be
extended with additional devices, alongside a collection of
BaseChipsetDeviceInterfaces
that will need to be wired up by the
caller.