Skip to main content

ControlRegister4

Struct ControlRegister4 

Source
pub struct ControlRegister4(/* private fields */);
Expand description

The layout of CR4.

Implementations§

Source§

impl ControlRegister4

Source

pub const RSVD1_MASK: u64

Mask of all reserved-as-1 bits.

Source

pub const RSVD0_MASK: u64

Mask of all reserved-as-0 bits.

Source

pub const DEFAULT: u64

The default value of the layout, combining all field defaults and reserved-as values.

Source

pub const PKS_MASK: u64

Unshifted bitmask of pks.

Source

pub const PKS_SHIFT: usize = 24

Bit shift (i.e., the low bit) of pks.

Source

pub const CET_MASK: u64

Unshifted bitmask of cet.

Source

pub const CET_SHIFT: usize = 23

Bit shift (i.e., the low bit) of cet.

Source

pub const PKE_MASK: u64

Unshifted bitmask of pke.

Source

pub const PKE_SHIFT: usize = 22

Bit shift (i.e., the low bit) of pke.

Source

pub const SMAP_MASK: u64

Unshifted bitmask of smap.

Source

pub const SMAP_SHIFT: usize = 21

Bit shift (i.e., the low bit) of smap.

Source

pub const SMEP_MASK: u64

Unshifted bitmask of smep.

Source

pub const SMEP_SHIFT: usize = 20

Bit shift (i.e., the low bit) of smep.

Source

pub const OSXSAVE_MASK: u64

Unshifted bitmask of osxsave.

Source

pub const OSXSAVE_SHIFT: usize = 18

Bit shift (i.e., the low bit) of osxsave.

Source

pub const PCIDE_MASK: u64

Unshifted bitmask of pcide.

Source

pub const PCIDE_SHIFT: usize = 17

Bit shift (i.e., the low bit) of pcide.

Source

pub const FSGSBASE_MASK: u64

Unshifted bitmask of fsgsbase.

Source

pub const FSGSBASE_SHIFT: usize = 16

Bit shift (i.e., the low bit) of fsgsbase.

Source

pub const SMXE_MASK: u64

Unshifted bitmask of smxe.

Source

pub const SMXE_SHIFT: usize = 14

Bit shift (i.e., the low bit) of smxe.

Source

pub const VMXE_MASK: u64

Unshifted bitmask of vmxe.

Source

pub const VMXE_SHIFT: usize = 13

Bit shift (i.e., the low bit) of vmxe.

Source

pub const LA57_MASK: u64

Unshifted bitmask of la57.

Source

pub const LA57_SHIFT: usize = 12

Bit shift (i.e., the low bit) of la57.

Source

pub const UMIP_MASK: u64

Unshifted bitmask of umip.

Source

pub const UMIP_SHIFT: usize = 11

Bit shift (i.e., the low bit) of umip.

Source

pub const OSMMEXCPT_MASK: u64

Unshifted bitmask of osmmexcpt.

Source

pub const OSMMEXCPT_SHIFT: usize = 10

Bit shift (i.e., the low bit) of osmmexcpt.

Source

pub const OSFXSR_MASK: u64

Unshifted bitmask of osfxsr.

Source

pub const OSFXSR_SHIFT: usize = 9

Bit shift (i.e., the low bit) of osfxsr.

Source

pub const PCE_MASK: u64

Unshifted bitmask of pce.

Source

pub const PCE_SHIFT: usize = 8

Bit shift (i.e., the low bit) of pce.

Source

pub const PGE_MASK: u64

Unshifted bitmask of pge.

Source

pub const PGE_SHIFT: usize = 7

Bit shift (i.e., the low bit) of pge.

Source

pub const MCE_MASK: u64

Unshifted bitmask of mce.

Source

pub const MCE_SHIFT: usize = 6

Bit shift (i.e., the low bit) of mce.

Source

pub const PAE_MASK: u64

Unshifted bitmask of pae.

Source

pub const PAE_SHIFT: usize = 5

Bit shift (i.e., the low bit) of pae.

Source

pub const PSE_MASK: u64

Unshifted bitmask of pse.

Source

pub const PSE_SHIFT: usize = 4

Bit shift (i.e., the low bit) of pse.

Source

pub const DE_MASK: u64

Unshifted bitmask of de.

Source

pub const DE_SHIFT: usize = 3

Bit shift (i.e., the low bit) of de.

Source

pub const TSD_MASK: u64

Unshifted bitmask of tsd.

Source

pub const TSD_SHIFT: usize = 2

Bit shift (i.e., the low bit) of tsd.

Source

pub const PVI_MASK: u64

Unshifted bitmask of pvi.

Source

pub const PVI_SHIFT: usize = 1

Bit shift (i.e., the low bit) of pvi.

Source

pub const VME_MASK: u64

Unshifted bitmask of vme.

Source

pub const VME_SHIFT: usize = 0

Bit shift (i.e., the low bit) of vme.

Source

pub const FIELDS: [FieldMetadata<u64>; 23]

Metadata of all named fields in the layout.

Source

pub const fn new() -> Self

Creates a new instance with reserved-as-1 bits set and all other bits zeroed (i.e., with a value of Self::RSVD1_MASK).

Source

pub const fn bits(self) -> u64

Source

pub const fn pks(&self) -> bool

The value of ControlRegister424.

Source

pub const fn set_pks(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister424.

Source

pub const fn cet(&self) -> bool

The value of ControlRegister423.

Source

pub const fn set_cet(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister423.

Source

pub const fn pke(&self) -> bool

The value of ControlRegister422.

Source

pub const fn set_pke(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister422.

Source

pub const fn smap(&self) -> bool

The value of ControlRegister421.

Source

pub const fn set_smap(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister421.

Source

pub const fn smep(&self) -> bool

The value of ControlRegister420.

Source

pub const fn set_smep(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister420.

Source

pub const fn osxsave(&self) -> bool

The value of ControlRegister418.

Source

pub const fn set_osxsave(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister418.

Source

pub const fn pcide(&self) -> bool

The value of ControlRegister417.

Source

pub const fn set_pcide(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister417.

Source

pub const fn fsgsbase(&self) -> bool

The value of ControlRegister416.

Source

pub const fn set_fsgsbase(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister416.

Source

pub const fn smxe(&self) -> bool

The value of ControlRegister414.

Source

pub const fn set_smxe(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister414.

Source

pub const fn vmxe(&self) -> bool

The value of ControlRegister413.

Source

pub const fn set_vmxe(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister413.

Source

pub const fn la57(&self) -> bool

The value of ControlRegister412.

Source

pub const fn set_la57(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister412.

Source

pub const fn umip(&self) -> bool

The value of ControlRegister411.

Source

pub const fn set_umip(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister411.

Source

pub const fn osmmexcpt(&self) -> bool

The value of ControlRegister410.

Source

pub const fn set_osmmexcpt(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister410.

Source

pub const fn osfxsr(&self) -> bool

The value of ControlRegister49.

Source

pub const fn set_osfxsr(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister49.

Source

pub const fn pce(&self) -> bool

The value of ControlRegister48.

Source

pub const fn set_pce(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister48.

Source

pub const fn pge(&self) -> bool

The value of ControlRegister47.

Source

pub const fn set_pge(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister47.

Source

pub const fn mce(&self) -> bool

The value of ControlRegister46.

Source

pub const fn set_mce(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister46.

Source

pub const fn pae(&self) -> bool

The value of ControlRegister45.

Source

pub const fn set_pae(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister45.

Source

pub const fn pse(&self) -> bool

The value of ControlRegister44.

Source

pub const fn set_pse(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister44.

Source

pub const fn de(&self) -> bool

The value of ControlRegister43.

Source

pub const fn set_de(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister43.

Source

pub const fn tsd(&self) -> bool

The value of ControlRegister42.

Source

pub const fn set_tsd(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister42.

Source

pub const fn pvi(&self) -> bool

The value of ControlRegister41.

Source

pub const fn set_pvi(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister41.

Source

pub const fn vme(&self) -> bool

The value of ControlRegister40.

Source

pub const fn set_vme(&mut self, value: bool) -> &mut Self

Sets the value of ControlRegister40.

Source§

impl ControlRegister4

Source

pub fn iter(&self) -> ControlRegister4Iter

Returns an iterator over (metadata, value) pairs for each field.

Trait Implementations§

Source§

impl Binary for ControlRegister4

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Clone for ControlRegister4

Source§

fn clone(&self) -> ControlRegister4

Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ControlRegister4

Source§

impl Debug for ControlRegister4

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ControlRegister4

Source§

fn default() -> Self

Returns an instance with the default bits set (i.e,. with a value of Self::DEFAULT.

Source§

impl Eq for ControlRegister4

Source§

impl From<ControlRegister4> for u64

Source§

fn from(value: ControlRegister4) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for ControlRegister4

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.
Source§

impl IntoIterator for ControlRegister4

Source§

type Item = (&'static FieldMetadata<u64>, u64)

The type of the elements being iterated over.
Source§

type IntoIter = ControlRegister4Iter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a> IntoIterator for &'a ControlRegister4

Source§

type Item = (&'static FieldMetadata<u64>, u64)

The type of the elements being iterated over.
Source§

type IntoIter = ControlRegister4Iter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for ControlRegister4

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Octal for ControlRegister4

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ControlRegister4

Source§

fn eq(&self, other: &ControlRegister4) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable)§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ControlRegister4

Source§

impl UpperHex for ControlRegister4

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for ControlRegister4

§

impl RefUnwindSafe for ControlRegister4

§

impl Send for ControlRegister4

§

impl Sync for ControlRegister4

§

impl Unpin for ControlRegister4

§

impl UnsafeUnpin for ControlRegister4

§

impl UnwindSafe for ControlRegister4

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

Source§

impl<Layout, Base> LayoutOver<Base> for Layout
where Layout: Copy + From<Base> + Into<Base>,

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.