pub struct MsrSnapshot {Show 17 fields
pub feature_control: u64,
pub basic: u64,
pub pin_based: u64,
pub primary_proc_based: u64,
pub exit_controls: u64,
pub entry_controls: u64,
pub misc: u64,
pub cr0_fixed0: u64,
pub cr0_fixed1: u64,
pub cr4_fixed0: u64,
pub cr4_fixed1: u64,
pub secondary_proc_based: u64,
pub ept_vpid_cap: u64,
pub true_pin_based: Option<u64>,
pub true_primary_proc_based: Option<u64>,
pub true_exit_controls: Option<u64>,
pub true_entry_controls: Option<u64>,
}Expand description
Snapshot of the MSRs needed for detection. All values are
raw (as read), decoding is done by HwCaps::from_snapshot.
Fields§
§feature_control: u64§basic: u64§pin_based: u64§primary_proc_based: u64§exit_controls: u64§entry_controls: u64§misc: u64§cr0_fixed0: u64§cr0_fixed1: u64§cr4_fixed0: u64§cr4_fixed1: u64§secondary_proc_based: u64§ept_vpid_cap: u64§true_pin_based: Option<u64>§true_primary_proc_based: Option<u64>§true_exit_controls: Option<u64>§true_entry_controls: Option<u64>Implementations§
Source§impl MsrSnapshot
impl MsrSnapshot
Sourcepub fn from_reader<R: Fn(u32) -> u64>(read: R) -> Self
pub fn from_reader<R: Fn(u32) -> u64>(read: R) -> Self
Builds a snapshot from an MSR reader (the kernel provides
an rdmsr reader, the tests a synthetic reader).
Trait Implementations§
Source§impl Clone for MsrSnapshot
impl Clone for MsrSnapshot
impl Copy for MsrSnapshot
Source§impl Debug for MsrSnapshot
impl Debug for MsrSnapshot
Source§impl Default for MsrSnapshot
impl Default for MsrSnapshot
impl Eq for MsrSnapshot
Source§impl PartialEq for MsrSnapshot
impl PartialEq for MsrSnapshot
impl StructuralPartialEq for MsrSnapshot
Auto Trait Implementations§
impl Forget for MsrSnapshot
impl Freeze for MsrSnapshot
impl Move for MsrSnapshot
impl RefUnwindSafe for MsrSnapshot
impl Send for MsrSnapshot
impl Sync for MsrSnapshot
impl Unpin for MsrSnapshot
impl UnsafeUnpin for MsrSnapshot
impl UnwindSafe for MsrSnapshot
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more