pub struct ControlRegister4(/* private fields */);Expand description
The layout of CR4.
Implementations§
Source§impl ControlRegister4
impl ControlRegister4
Sourcepub const RSVD1_MASK: u64
pub const RSVD1_MASK: u64
Mask of all reserved-as-1 bits.
Sourcepub const RSVD0_MASK: u64
pub const RSVD0_MASK: u64
Mask of all reserved-as-0 bits.
Sourcepub const DEFAULT: u64
pub const DEFAULT: u64
The default value of the layout, combining all field defaults and reserved-as values.
Sourcepub const SMAP_SHIFT: usize = 21
pub const SMAP_SHIFT: usize = 21
Bit shift (i.e., the low bit) of smap.
Sourcepub const SMEP_SHIFT: usize = 20
pub const SMEP_SHIFT: usize = 20
Bit shift (i.e., the low bit) of smep.
Sourcepub const OSXSAVE_MASK: u64
pub const OSXSAVE_MASK: u64
Unshifted bitmask of osxsave.
Sourcepub const OSXSAVE_SHIFT: usize = 18
pub const OSXSAVE_SHIFT: usize = 18
Bit shift (i.e., the low bit) of osxsave.
Sourcepub const PCIDE_MASK: u64
pub const PCIDE_MASK: u64
Unshifted bitmask of pcide.
Sourcepub const PCIDE_SHIFT: usize = 17
pub const PCIDE_SHIFT: usize = 17
Bit shift (i.e., the low bit) of pcide.
Sourcepub const FSGSBASE_MASK: u64
pub const FSGSBASE_MASK: u64
Unshifted bitmask of fsgsbase.
Sourcepub const FSGSBASE_SHIFT: usize = 16
pub const FSGSBASE_SHIFT: usize = 16
Bit shift (i.e., the low bit) of fsgsbase.
Sourcepub const SMXE_SHIFT: usize = 14
pub const SMXE_SHIFT: usize = 14
Bit shift (i.e., the low bit) of smxe.
Sourcepub const VMXE_SHIFT: usize = 13
pub const VMXE_SHIFT: usize = 13
Bit shift (i.e., the low bit) of vmxe.
Sourcepub const LA57_SHIFT: usize = 12
pub const LA57_SHIFT: usize = 12
Bit shift (i.e., the low bit) of la57.
Sourcepub const UMIP_SHIFT: usize = 11
pub const UMIP_SHIFT: usize = 11
Bit shift (i.e., the low bit) of umip.
Sourcepub const OSMMEXCPT_MASK: u64
pub const OSMMEXCPT_MASK: u64
Unshifted bitmask of osmmexcpt.
Sourcepub const OSMMEXCPT_SHIFT: usize = 10
pub const OSMMEXCPT_SHIFT: usize = 10
Bit shift (i.e., the low bit) of osmmexcpt.
Sourcepub const OSFXSR_MASK: u64
pub const OSFXSR_MASK: u64
Unshifted bitmask of osfxsr.
Sourcepub const OSFXSR_SHIFT: usize = 9
pub const OSFXSR_SHIFT: usize = 9
Bit shift (i.e., the low bit) of osfxsr.
Sourcepub const FIELDS: [FieldMetadata<u64>; 23]
pub const FIELDS: [FieldMetadata<u64>; 23]
Metadata of all named fields in the layout.
Sourcepub const fn new() -> Self
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).
pub const fn bits(self) -> u64
Sourcepub const fn set_pks(&mut self, value: bool) -> &mut Self
pub const fn set_pks(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister424.
Sourcepub const fn set_cet(&mut self, value: bool) -> &mut Self
pub const fn set_cet(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister423.
Sourcepub const fn set_pke(&mut self, value: bool) -> &mut Self
pub const fn set_pke(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister422.
Sourcepub const fn set_smap(&mut self, value: bool) -> &mut Self
pub const fn set_smap(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister421.
Sourcepub const fn set_smep(&mut self, value: bool) -> &mut Self
pub const fn set_smep(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister420.
Sourcepub const fn set_osxsave(&mut self, value: bool) -> &mut Self
pub const fn set_osxsave(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister418.
Sourcepub const fn set_pcide(&mut self, value: bool) -> &mut Self
pub const fn set_pcide(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister417.
Sourcepub const fn set_fsgsbase(&mut self, value: bool) -> &mut Self
pub const fn set_fsgsbase(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister416.
Sourcepub const fn set_smxe(&mut self, value: bool) -> &mut Self
pub const fn set_smxe(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister414.
Sourcepub const fn set_vmxe(&mut self, value: bool) -> &mut Self
pub const fn set_vmxe(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister413.
Sourcepub const fn set_la57(&mut self, value: bool) -> &mut Self
pub const fn set_la57(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister412.
Sourcepub const fn set_umip(&mut self, value: bool) -> &mut Self
pub const fn set_umip(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister411.
Sourcepub const fn set_osmmexcpt(&mut self, value: bool) -> &mut Self
pub const fn set_osmmexcpt(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister410.
Sourcepub const fn set_osfxsr(&mut self, value: bool) -> &mut Self
pub const fn set_osfxsr(&mut self, value: bool) -> &mut Self
Sets the value of ControlRegister49.
Trait Implementations§
Source§impl Binary for ControlRegister4
impl Binary for ControlRegister4
Source§impl Clone for ControlRegister4
impl Clone for ControlRegister4
Source§fn clone(&self) -> ControlRegister4
fn clone(&self) -> ControlRegister4
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ControlRegister4
Source§impl Debug for ControlRegister4
impl Debug for ControlRegister4
Source§impl Default for ControlRegister4
impl Default for ControlRegister4
Source§fn default() -> Self
fn default() -> Self
Returns an instance with the default bits set (i.e,. with a
value of Self::DEFAULT.
impl Eq for ControlRegister4
Source§impl From<ControlRegister4> for u64
impl From<ControlRegister4> for u64
Source§fn from(value: ControlRegister4) -> Self
fn from(value: ControlRegister4) -> Self
Source§impl From<u64> for ControlRegister4
impl From<u64> for ControlRegister4
Source§impl IntoIterator for ControlRegister4
impl IntoIterator for ControlRegister4
Source§impl<'a> IntoIterator for &'a ControlRegister4
impl<'a> IntoIterator for &'a ControlRegister4
Source§impl LowerHex for ControlRegister4
impl LowerHex for ControlRegister4
Source§impl Octal for ControlRegister4
impl Octal for ControlRegister4
Source§impl PartialEq for ControlRegister4
impl PartialEq for ControlRegister4
impl StructuralPartialEq for ControlRegister4
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 Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)