Enum arch::MsrValueFrom
source · pub enum MsrValueFrom {
RWFromCPU0,
RWFromRunningCPU,
}
Expand description
Source CPU of MSR value
Indicate which CPU that user get/set MSRs from/to.
Variants§
RWFromCPU0
Read/write MSR value from/into CPU 0. The MSR source CPU always be CPU 0.
RWFromRunningCPU
Read/write MSR value from/into the running CPU. If vCPU migrates to another pcpu, the MSR source CPU will also change.
Implementations§
source§impl MsrValueFrom
impl MsrValueFrom
sourcepub fn get_cpu_id(&self) -> usize
pub fn get_cpu_id(&self) -> usize
Get the physical(host) CPU id from MsrValueFrom type.
Trait Implementations§
source§impl Clone for MsrValueFrom
impl Clone for MsrValueFrom
source§fn clone(&self) -> MsrValueFrom
fn clone(&self) -> MsrValueFrom
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MsrValueFrom
impl Debug for MsrValueFrom
source§impl<'de> Deserialize<'de> for MsrValueFrom
impl<'de> Deserialize<'de> for MsrValueFrom
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<MsrValueFrom> for MsrValueFrom
impl PartialEq<MsrValueFrom> for MsrValueFrom
source§fn eq(&self, other: &MsrValueFrom) -> bool
fn eq(&self, other: &MsrValueFrom) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MsrValueFrom
impl Serialize for MsrValueFrom
impl Copy for MsrValueFrom
impl Eq for MsrValueFrom
impl StructuralEq for MsrValueFrom
impl StructuralPartialEq for MsrValueFrom
Auto Trait Implementations§
impl RefUnwindSafe for MsrValueFrom
impl Send for MsrValueFrom
impl Sync for MsrValueFrom
impl Unpin for MsrValueFrom
impl UnwindSafe for MsrValueFrom
Blanket Implementations§
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.