#[repr(C, align(64))]pub struct ExtendedState {
pub data: [u8; 2688],
pub size: usize,
pub uses_xsave: bool,
pub xcr0_mask: u64,
}Expand description
FPU/SSE/AVX extended state, saved and restored on context switch.
When XSAVE is available, uses xsave/xrstor with a variable-size area.
Falls back to fxsave/fxrstor (512 bytes) on older CPUs.
Fields§
§data: [u8; 2688]§size: usize§uses_xsave: bool§xcr0_mask: u64Implementations§
Source§impl ExtendedState
impl ExtendedState
pub const FXSAVE_SIZE: usize = 512
pub const MAX_XSAVE_SIZE: usize = 2688
Sourcepub fn for_xcr0(xcr0: u64) -> Self
pub fn for_xcr0(xcr0: u64) -> Self
Create a state for a specific XCR0 mask (per-silo feature restriction).
Sourcepub fn copy_from(&mut self, other: &ExtendedState)
pub fn copy_from(&mut self, other: &ExtendedState)
Copy the state from another ExtendedState.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExtendedState
impl RefUnwindSafe for ExtendedState
impl Send for ExtendedState
impl Sync for ExtendedState
impl Unpin for ExtendedState
impl UnsafeUnpin for ExtendedState
impl UnwindSafe for ExtendedState
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
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