pub fn pkru_usable(xcr0: u64, ospke: bool) -> Result<bool, ProbeRefusal>Expand description
Whether the probe may run RDPKRU and WRPKRU: exactly when XCR0 enables the PKRU component and the kernel enables protection keys (CPUID.7.0:ECX.OSPKE, from CR4.PKE); either instruction raises #UD without the latter. A host whose XCR0 has PKRU but whose kernel does not enable it is refused, since the PKRU cases could not run there.