pub struct XsaveProfile {
pub xcr0_mask: u64,
pub area_size: usize,
pub align: usize,
}Expand description
Cached extended-state save profile, frozen once at init().
Precomputed so context-switch / task-creation code never walks CPUID
leaf 0x0D sub-leaves at runtime (see xsave_size_for_xcr0, which is
correct but too slow for hot paths).
Fields§
§xcr0_mask: u64XCR0 mask the kernel programs (x87|SSE|AVX|AVX-512 as available).
area_size: usizeSave-area size in bytes for that mask, rounded UP to a 64-byte multiple so allocators can over-allocate safely.
align: usizeAlignment required by the save instruction: XSAVE/XRSTOR fault (#GP) on non-64-byte operands; FXSAVE/FXRSTOR only require 16 bytes, but we standardize on 64 everywhere (over-alignment is harmless).
Trait Implementations§
Source§impl Clone for XsaveProfile
impl Clone for XsaveProfile
Source§fn clone(&self) -> XsaveProfile
fn clone(&self) -> XsaveProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for XsaveProfile
Auto Trait Implementations§
impl Freeze for XsaveProfile
impl RefUnwindSafe for XsaveProfile
impl Send for XsaveProfile
impl Sync for XsaveProfile
impl Unpin for XsaveProfile
impl UnsafeUnpin for XsaveProfile
impl UnwindSafe for XsaveProfile
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
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,
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