Skip to main content

Ia32FeatureControl

Struct Ia32FeatureControl 

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

IA32_FEATURE_CONTROL MSR (0x3A) layout.

Implementations§

Source§

impl Ia32FeatureControl

Source

pub const fn new() -> Self

Creates a new default initialized bitfield.

Source

pub const fn from_bits(bits: u64) -> Self

Convert from bits.

Source

pub const fn into_bits(self) -> u64

Convert into bits.

Source

pub const fn locked(&self) -> bool

Lock bit. Once set, further writes to IA32_FEATURE_CONTROL are ignored until the next reset.

Bits: 0..1

Source

pub const fn with_locked_checked(self, value: bool) -> Result<Self, ()>

Lock bit. Once set, further writes to IA32_FEATURE_CONTROL are ignored until the next reset.

Bits: 0..1

Source

pub const fn with_locked(self, value: bool) -> Self

Lock bit. Once set, further writes to IA32_FEATURE_CONTROL are ignored until the next reset.

Bits: 0..1

Source

pub const fn set_locked(&mut self, value: bool)

Lock bit. Once set, further writes to IA32_FEATURE_CONTROL are ignored until the next reset.

Bits: 0..1

Source

pub const fn set_locked_checked(&mut self, value: bool) -> Result<(), ()>

Lock bit. Once set, further writes to IA32_FEATURE_CONTROL are ignored until the next reset.

Bits: 0..1

Source

pub const fn vmx_enabled_inside_smx(&self) -> bool

Enable VMX inside SMX operation.

Bits: 1..2

Source

pub const fn with_vmx_enabled_inside_smx_checked( self, value: bool, ) -> Result<Self, ()>

Enable VMX inside SMX operation.

Bits: 1..2

Source

pub const fn with_vmx_enabled_inside_smx(self, value: bool) -> Self

Enable VMX inside SMX operation.

Bits: 1..2

Source

pub const fn set_vmx_enabled_inside_smx(&mut self, value: bool)

Enable VMX inside SMX operation.

Bits: 1..2

Source

pub const fn set_vmx_enabled_inside_smx_checked( &mut self, value: bool, ) -> Result<(), ()>

Enable VMX inside SMX operation.

Bits: 1..2

Source

pub const fn vmx_enabled_outside_smx(&self) -> bool

Enable VMX outside SMX operation.

Bits: 2..3

Source

pub const fn with_vmx_enabled_outside_smx_checked( self, value: bool, ) -> Result<Self, ()>

Enable VMX outside SMX operation.

Bits: 2..3

Source

pub const fn with_vmx_enabled_outside_smx(self, value: bool) -> Self

Enable VMX outside SMX operation.

Bits: 2..3

Source

pub const fn set_vmx_enabled_outside_smx(&mut self, value: bool)

Enable VMX outside SMX operation.

Bits: 2..3

Source

pub const fn set_vmx_enabled_outside_smx_checked( &mut self, value: bool, ) -> Result<(), ()>

Enable VMX outside SMX operation.

Bits: 2..3

Source

pub const fn senter_local_enables(&self) -> u8

SENTER local function enables (bits 8..14).

Bits: 8..15

Source

pub const fn with_senter_local_enables_checked( self, value: u8, ) -> Result<Self, ()>

SENTER local function enables (bits 8..14).

Bits: 8..15

Source

pub const fn with_senter_local_enables(self, value: u8) -> Self

SENTER local function enables (bits 8..14).

Bits: 8..15

Source

pub const fn set_senter_local_enables(&mut self, value: u8)

SENTER local function enables (bits 8..14).

Bits: 8..15

Source

pub const fn set_senter_local_enables_checked( &mut self, value: u8, ) -> Result<(), ()>

SENTER local function enables (bits 8..14).

Bits: 8..15

Source

pub const fn senter_global_enable(&self) -> bool

SENTER global enable.

Bits: 15..16

Source

pub const fn with_senter_global_enable_checked( self, value: bool, ) -> Result<Self, ()>

SENTER global enable.

Bits: 15..16

Source

pub const fn with_senter_global_enable(self, value: bool) -> Self

SENTER global enable.

Bits: 15..16

Source

pub const fn set_senter_global_enable(&mut self, value: bool)

SENTER global enable.

Bits: 15..16

Source

pub const fn set_senter_global_enable_checked( &mut self, value: bool, ) -> Result<(), ()>

SENTER global enable.

Bits: 15..16

Source

pub const fn sgx_launch_control_enable(&self) -> bool

SGX launch control enable.

Bits: 17..18

Source

pub const fn with_sgx_launch_control_enable_checked( self, value: bool, ) -> Result<Self, ()>

SGX launch control enable.

Bits: 17..18

Source

pub const fn with_sgx_launch_control_enable(self, value: bool) -> Self

SGX launch control enable.

Bits: 17..18

Source

pub const fn set_sgx_launch_control_enable(&mut self, value: bool)

SGX launch control enable.

Bits: 17..18

Source

pub const fn set_sgx_launch_control_enable_checked( &mut self, value: bool, ) -> Result<(), ()>

SGX launch control enable.

Bits: 17..18

Source

pub const fn sgx_global_enable(&self) -> bool

SGX global enable.

Bits: 18..19

Source

pub const fn with_sgx_global_enable_checked( self, value: bool, ) -> Result<Self, ()>

SGX global enable.

Bits: 18..19

Source

pub const fn with_sgx_global_enable(self, value: bool) -> Self

SGX global enable.

Bits: 18..19

Source

pub const fn set_sgx_global_enable(&mut self, value: bool)

SGX global enable.

Bits: 18..19

Source

pub const fn set_sgx_global_enable_checked( &mut self, value: bool, ) -> Result<(), ()>

SGX global enable.

Bits: 18..19

Source

pub const fn lmce_on(&self) -> bool

LMCE (Local Machine Check Exception) on.

Bits: 20..21

Source

pub const fn with_lmce_on_checked(self, value: bool) -> Result<Self, ()>

LMCE (Local Machine Check Exception) on.

Bits: 20..21

Source

pub const fn with_lmce_on(self, value: bool) -> Self

LMCE (Local Machine Check Exception) on.

Bits: 20..21

Source

pub const fn set_lmce_on(&mut self, value: bool)

LMCE (Local Machine Check Exception) on.

Bits: 20..21

Source

pub const fn set_lmce_on_checked(&mut self, value: bool) -> Result<(), ()>

LMCE (Local Machine Check Exception) on.

Bits: 20..21

Trait Implementations§

Source§

impl Clone for Ia32FeatureControl

Source§

fn clone(&self) -> Ia32FeatureControl

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Ia32FeatureControl

Source§

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

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

impl Default for Ia32FeatureControl

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<Ia32FeatureControl> for u64

Source§

fn from(v: Ia32FeatureControl) -> u64

Converts to this type from the input type.
Source§

impl From<u64> for Ia32FeatureControl

Source§

fn from(v: u64) -> Self

Converts to this type from the input type.
Source§

impl Copy for Ia32FeatureControl

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

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<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.