Struct vm_topology::processor::VpIndex
source · pub struct VpIndex(/* private fields */);
Expand description
The virtual processor index.
This value is used inside the VMM to identify the processor. It is expected to be used as an index into processor arrays, so it starts at zero and has no gaps.
VP index zero is special in that it is always present and is always the BSP.
The same value is exposed to the guest operating system as the HV VP index, via the Microsoft hypervisor guest interface. This constrains the HV VP index to start at zero and have no gaps, which is not required by the hypervisor interface, but it matches the behavior of Hyper-V and is not a practical limitation.
This value is distinct from the APIC ID, although they are often the same for all processors in small VMs and some in large VMs. Be careful not to use them interchangeably.
Implementations§
source§impl VpIndex
impl VpIndex
sourcepub const BSP: Self = _
pub const BSP: Self = _
VP index zero, corresponding to the boot processor (BSP).
Note that this being a constant means that the BSP’s HV VP index observed by the guest will always be zero. This is consistent with Hyper-V and is not a practical limitation.
Note that the APIC ID of the BSP might not be zero.
Trait Implementations§
source§impl Ord for VpIndex
impl Ord for VpIndex
source§impl PartialOrd for VpIndex
impl PartialOrd for VpIndex
impl Copy for VpIndex
impl Eq for VpIndex
impl StructuralPartialEq for VpIndex
Auto Trait Implementations§
impl Freeze for VpIndex
impl RefUnwindSafe for VpIndex
impl Send for VpIndex
impl Sync for VpIndex
impl Unpin for VpIndex
impl UnwindSafe for VpIndex
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
)