Skip to main content

xcr0_for_features

Function xcr0_for_features 

Source
pub fn xcr0_for_features(_features: CpuFeatures) -> u64
Expand description

Compute the XCR0 mask for a given set of allowed features, clamped to what the host actually supports.

NOTE: currently the host default mask is returned regardless of features (the kernel enables x87+SSE+AVX(+512) as one global profile). Kept as an API seam for per-feature XCR0 profiles.