Struct Cr4Flags
#[repr(transparent)]pub struct Cr4Flags(<Cr4Flags as PublicFlags>::Internal);Expand description
Configuration flags of the Cr4 register.
Tuple Fields§
§0: <Cr4Flags as PublicFlags>::InternalImplementations§
§impl Cr4Flags
impl Cr4Flags
pub const VIRTUAL_8086_MODE_EXTENSIONS: Cr4Flags
pub const VIRTUAL_8086_MODE_EXTENSIONS: Cr4Flags
Enables hardware-supported performance enhancements for software running in virtual-8086 mode.
pub const PROTECTED_MODE_VIRTUAL_INTERRUPTS: Cr4Flags
pub const PROTECTED_MODE_VIRTUAL_INTERRUPTS: Cr4Flags
Enables support for protected-mode virtual interrupts.
pub const TIMESTAMP_DISABLE: Cr4Flags
pub const TIMESTAMP_DISABLE: Cr4Flags
When set, only privilege-level 0 can execute the RDTSC or RDTSCP instructions.
pub const DEBUGGING_EXTENSIONS: Cr4Flags
pub const DEBUGGING_EXTENSIONS: Cr4Flags
Enables I/O breakpoint capability and enforces treatment of DR4 and DR5 registers
as reserved.
pub const PAGE_SIZE_EXTENSION: Cr4Flags
pub const PAGE_SIZE_EXTENSION: Cr4Flags
Enables the use of 4MB physical frames; ignored if
PHYSICAL_ADDRESS_EXTENSION
is set (so always ignored in long mode).
pub const PHYSICAL_ADDRESS_EXTENSION: Cr4Flags
pub const PHYSICAL_ADDRESS_EXTENSION: Cr4Flags
Enables physical address extensions and 2MB physical frames. Required in long mode.
pub const MACHINE_CHECK_EXCEPTION: Cr4Flags
pub const MACHINE_CHECK_EXCEPTION: Cr4Flags
Enables the machine-check exception mechanism.
pub const PAGE_GLOBAL: Cr4Flags
pub const PAGE_GLOBAL: Cr4Flags
Enables the global page feature, allowing some page translations to
be marked as global (see [PageTableFlags::GLOBAL]).
pub const PERFORMANCE_MONITOR_COUNTER: Cr4Flags
pub const PERFORMANCE_MONITOR_COUNTER: Cr4Flags
Allows software running at any privilege level to use the RDPMC instruction.
pub const OSFXSR: Cr4Flags
pub const OSFXSR: Cr4Flags
Enables the use of legacy SSE instructions; allows using FXSAVE/FXRSTOR for saving
processor state of 128-bit media instructions.
pub const OSXMMEXCPT_ENABLE: Cr4Flags
pub const OSXMMEXCPT_ENABLE: Cr4Flags
Enables the SIMD floating-point exception (#XF) for handling unmasked 256-bit and
128-bit media floating-point errors.
pub const USER_MODE_INSTRUCTION_PREVENTION: Cr4Flags
pub const USER_MODE_INSTRUCTION_PREVENTION: Cr4Flags
Prevents the execution of the SGDT, SIDT, SLDT, SMSW, and STR instructions by
user-mode software.
pub const VIRTUAL_MACHINE_EXTENSIONS: Cr4Flags
pub const VIRTUAL_MACHINE_EXTENSIONS: Cr4Flags
Enables VMX instructions (Intel Only).
pub const SAFER_MODE_EXTENSIONS: Cr4Flags
pub const SAFER_MODE_EXTENSIONS: Cr4Flags
Enables SMX instructions (Intel Only).
pub const FSGSBASE: Cr4Flags
pub const FSGSBASE: Cr4Flags
Enables software running in 64-bit mode at any privilege level to read and write the FS.base and GS.base hidden segment register state.
pub const OSXSAVE: Cr4Flags
pub const OSXSAVE: Cr4Flags
Enables extended processor state management instructions, including XGETBV and XSAVE.
pub const KEY_LOCKER: Cr4Flags
pub const KEY_LOCKER: Cr4Flags
Enables the Key Locker feature (Intel Only).
This enables creation and use of opaque AES key handles; see the Intel Key Locker Specification for more information.
pub const SUPERVISOR_MODE_EXECUTION_PROTECTION: Cr4Flags
pub const SUPERVISOR_MODE_EXECUTION_PROTECTION: Cr4Flags
Prevents the execution of instructions that reside in pages accessible by user-mode software when the processor is in supervisor-mode.
pub const SUPERVISOR_MODE_ACCESS_PREVENTION: Cr4Flags
pub const SUPERVISOR_MODE_ACCESS_PREVENTION: Cr4Flags
Enables restrictions for supervisor-mode software when reading data from user-mode pages.
pub const PROTECTION_KEY_USER: Cr4Flags
pub const PROTECTION_KEY_USER: Cr4Flags
Enables protection keys for user-mode pages.
Also enables access to the PKRU register (via the RDPKRU/WRPKRU
instructions) to set user-mode protection key access controls.
pub const CONTROL_FLOW_ENFORCEMENT: Cr4Flags
pub const CONTROL_FLOW_ENFORCEMENT: Cr4Flags
Enables Control-flow Enforcement Technology (CET)
This enables the shadow stack feature, ensuring return addresses read
via RET and IRET have not been corrupted.
pub const PROTECTION_KEY_SUPERVISOR: Cr4Flags
pub const PROTECTION_KEY_SUPERVISOR: Cr4Flags
Enables protection keys for supervisor-mode pages (Intel Only).
Also enables the IA32_PKRS MSR to set supervisor-mode protection
key access controls.
§impl Cr4Flags
impl Cr4Flags
pub const fn bits(&self) -> u64
pub const fn bits(&self) -> u64
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
pub const fn from_bits(bits: u64) -> Option<Cr4Flags>
pub const fn from_bits(bits: u64) -> Option<Cr4Flags>
Convert from a bits value.
This method will return None if any unknown bits are set.
pub const fn from_bits_truncate(bits: u64) -> Cr4Flags
pub const fn from_bits_truncate(bits: u64) -> Cr4Flags
Convert from a bits value, unsetting any unknown bits.
pub const fn from_bits_retain(bits: u64) -> Cr4Flags
pub const fn from_bits_retain(bits: u64) -> Cr4Flags
Convert from a bits value exactly.
pub fn from_name(name: &str) -> Option<Cr4Flags>
pub fn from_name(name: &str) -> Option<Cr4Flags>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
pub const fn intersects(&self, other: Cr4Flags) -> bool
pub const fn intersects(&self, other: Cr4Flags) -> bool
Whether any set bits in other are also set in self.
pub const fn contains(&self, other: Cr4Flags) -> bool
pub const fn contains(&self, other: Cr4Flags) -> bool
Whether all set bits in other are also set in self.
pub fn remove(&mut self, other: Cr4Flags)
pub fn remove(&mut self, other: Cr4Flags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
pub fn toggle(&mut self, other: Cr4Flags)
pub fn toggle(&mut self, other: Cr4Flags)
The bitwise exclusive-or (^) of the bits in self and other.
pub fn set(&mut self, other: Cr4Flags, value: bool)
pub fn set(&mut self, other: Cr4Flags, value: bool)
Call insert when value is true or remove when value is false.
pub const fn intersection(self, other: Cr4Flags) -> Cr4Flags
pub const fn intersection(self, other: Cr4Flags) -> Cr4Flags
The bitwise and (&) of the bits in self and other.
pub const fn union(self, other: Cr4Flags) -> Cr4Flags
pub const fn union(self, other: Cr4Flags) -> Cr4Flags
The bitwise or (|) of the bits in self and other.
pub const fn difference(self, other: Cr4Flags) -> Cr4Flags
pub const fn difference(self, other: Cr4Flags) -> Cr4Flags
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
pub const fn symmetric_difference(self, other: Cr4Flags) -> Cr4Flags
pub const fn symmetric_difference(self, other: Cr4Flags) -> Cr4Flags
The bitwise exclusive-or (^) of the bits in self and other.
pub const fn complement(self) -> Cr4Flags
pub const fn complement(self) -> Cr4Flags
The bitwise negation (!) of the bits in self, truncating the result.
§impl Cr4Flags
impl Cr4Flags
pub const fn iter(&self) -> Iter<Cr4Flags> ⓘ
pub const fn iter(&self) -> Iter<Cr4Flags> ⓘ
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
pub const fn iter_names(&self) -> IterNames<Cr4Flags> ⓘ
pub const fn iter_names(&self) -> IterNames<Cr4Flags> ⓘ
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
§impl BitAndAssign for Cr4Flags
impl BitAndAssign for Cr4Flags
§fn bitand_assign(&mut self, other: Cr4Flags)
fn bitand_assign(&mut self, other: Cr4Flags)
The bitwise and (&) of the bits in self and other.
§impl BitOrAssign for Cr4Flags
impl BitOrAssign for Cr4Flags
§fn bitor_assign(&mut self, other: Cr4Flags)
fn bitor_assign(&mut self, other: Cr4Flags)
The bitwise or (|) of the bits in self and other.
§impl BitXorAssign for Cr4Flags
impl BitXorAssign for Cr4Flags
§fn bitxor_assign(&mut self, other: Cr4Flags)
fn bitxor_assign(&mut self, other: Cr4Flags)
The bitwise exclusive-or (^) of the bits in self and other.
impl Copy for Cr4Flags
impl Eq for Cr4Flags
§impl Extend<Cr4Flags> for Cr4Flags
impl Extend<Cr4Flags> for Cr4Flags
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = Cr4Flags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = Cr4Flags>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)§impl Flags for Cr4Flags
impl Flags for Cr4Flags
§fn from_bits_retain(bits: u64) -> Cr4Flags
fn from_bits_retain(bits: u64) -> Cr4Flags
§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self> ⓘ
fn iter_names(&self) -> IterNames<Self> ⓘ
§fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
Self::FLAGS].§fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert] when value is true or [Flags::remove] when value is false.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.§impl FromIterator<Cr4Flags> for Cr4Flags
impl FromIterator<Cr4Flags> for Cr4Flags
§fn from_iter<T>(iterator: T) -> Cr4Flagswhere
T: IntoIterator<Item = Cr4Flags>,
fn from_iter<T>(iterator: T) -> Cr4Flagswhere
T: IntoIterator<Item = Cr4Flags>,
The bitwise or (|) of the bits in each flags value.
§impl IntoIterator for Cr4Flags
impl IntoIterator for Cr4Flags
§impl Ord for Cr4Flags
impl Ord for Cr4Flags
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialOrd for Cr4Flags
impl PartialOrd for Cr4Flags
impl StructuralPartialEq for Cr4Flags
§impl Sub for Cr4Flags
impl Sub for Cr4Flags
Auto Trait Implementations§
impl Freeze for Cr4Flags
impl RefUnwindSafe for Cr4Flags
impl Send for Cr4Flags
impl Sync for Cr4Flags
impl Unpin for Cr4Flags
impl UnsafeUnpin for Cr4Flags
impl UnwindSafe for Cr4Flags
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
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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
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> ⓘ
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> ⓘ
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