Struct x86_64::msr::MsrEmulateHandler
source · struct MsrEmulateHandler {
msr_data: u64,
}
Expand description
MsrPassthroughHandler - emulate handler that will handle RDMSR/WRMSR
with a dummy MSR value other than access to real
MSR.
This Handler will initialize a value(msr_data
) with the corresponding
Host MSR value, then handle the RDMSR/WRMSR based on this “value”.
For RDMSR, this handler will give Guest the stored msr_data
.
For WRMSR, this handler will directly change msr_data
without the
modification on real Host MSR. The change will not take effect on the
real MSR of Host.
‘emulate’ Handler is used in the case, that some driver need to control MSR and user just wants to make WRMSR successful and doesn’t care about if WRMSR really works. This handlers make Guest’s control of CPU not affect the host
Fields§
§msr_data: u64
Only initialize msr_data with MSR source pCPU, and will not update msr value changes on host cpu into msr_data.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for MsrEmulateHandler
impl Send for MsrEmulateHandler
impl Sync for MsrEmulateHandler
impl Unpin for MsrEmulateHandler
impl UnwindSafe for MsrEmulateHandler
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>
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>
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)
&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)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.