Struct vm_topology::processor::ProcessorTopology
source · pub struct ProcessorTopology<T: ArchTopology = TargetTopology> { /* private fields */ }
Expand description
A description of the VM’s processor topology.
Currently this just tracks the APIC IDs for the processors.
Build one with TopologyBuilder
.
Implementations§
source§impl ProcessorTopology<Aarch64Topology>
impl ProcessorTopology<Aarch64Topology>
sourcepub fn gic_distributor_base(&self) -> u64
pub fn gic_distributor_base(&self) -> u64
Returns the GIC distributor base
sourcepub fn gic_redistributors_base(&self) -> u64
pub fn gic_redistributors_base(&self) -> u64
Returns the GIC redistributors base
source§impl<T: ArchTopology + Inspect> ProcessorTopology<T>
impl<T: ArchTopology + Inspect> ProcessorTopology<T>
sourcepub fn vp(&self, vp_index: VpIndex) -> VpInfo
pub fn vp(&self, vp_index: VpIndex) -> VpInfo
Returns information for the given processor by VP index.
Panics if the VP index is out of range.
sourcepub fn vp_arch(&self, vp_index: VpIndex) -> T::ArchVpInfo
pub fn vp_arch(&self, vp_index: VpIndex) -> T::ArchVpInfo
Returns information for the given processor by VP index, including architecture-specific information.
Panics if the VP index is out of range.
sourcepub fn vps(&self) -> impl '_ + ExactSizeIterator<Item = VpInfo> + Clone
pub fn vps(&self) -> impl '_ + ExactSizeIterator<Item = VpInfo> + Clone
Returns an iterator over all VPs.
sourcepub fn vps_arch(
&self,
) -> impl '_ + ExactSizeIterator<Item = T::ArchVpInfo> + Clone
pub fn vps_arch( &self, ) -> impl '_ + ExactSizeIterator<Item = T::ArchVpInfo> + Clone
Returns an iterator over all VPs, including architecture-specific information.
sourcepub fn smt_enabled(&self) -> bool
pub fn smt_enabled(&self) -> bool
Returns whether SMT (hyperthreading) is enabled.
sourcepub fn reserved_vps_per_socket(&self) -> u32
pub fn reserved_vps_per_socket(&self) -> u32
Returns the number of VPs per socket.
This will always be a power of 2. The number of VPs actually populated in a socket may be smaller than this.
sourcepub fn vp_topology(&self, vp_index: VpIndex) -> VpTopologyInfo
pub fn vp_topology(&self, vp_index: VpIndex) -> VpTopologyInfo
Computes the processor topology information for a VP.
Trait Implementations§
source§impl<T: Clone + ArchTopology> Clone for ProcessorTopology<T>where
T::ArchVpInfo: Clone,
impl<T: Clone + ArchTopology> Clone for ProcessorTopology<T>where
T::ArchVpInfo: Clone,
source§fn clone(&self) -> ProcessorTopology<T>
fn clone(&self) -> ProcessorTopology<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T: Debug + ArchTopology> Debug for ProcessorTopology<T>where
T::ArchVpInfo: Debug,
impl<T: Debug + ArchTopology> Debug for ProcessorTopology<T>where
T::ArchVpInfo: Debug,
source§impl<T> Inspect for ProcessorTopology<T>
impl<T> Inspect for ProcessorTopology<T>
Auto Trait Implementations§
impl<T> Freeze for ProcessorTopology<T>where
T: Freeze,
impl<T> RefUnwindSafe for ProcessorTopology<T>
impl<T> Send for ProcessorTopology<T>
impl<T> Sync for ProcessorTopology<T>
impl<T> Unpin for ProcessorTopology<T>
impl<T> UnwindSafe for ProcessorTopology<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)