xrstors(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay so welcome to xrstors(9) from the Kernel API Manual, bestie β€” this little icon is here to restore selected components from a kernel xstate buffer. Slay.


✨ SYNOPSIS ✨

void xrstors (struct xregs_state *xstate , u64 mask );

πŸŽ€ ARGUMENTS πŸŽ€

  • xstate β€” pointer to the buffer. It's literally the buffer, bestie.
  • mask β€” feature mask to select the components to restore. It's the "which components are we bringing back?" picker.

🧚 DESCRIPTION 🧚

The xstate buffer must be 64 byte aligned and correctly initialized β€” otherwise XRSTORS from that buffer can #GP. No cap, that's the warning, and it is not a cute look.

Proper usage is to restore the state which was saved with xsaves into xstate. Like, that's the intended pairing: xsaves tucks it away, xrstors brings it back. πŸ’…

The feature mask must be a subset of the independent features. Periodt β€” that's the rule.

⚠️ reminder: 64 byte aligned + correctly initialized, or XRSTORS from that buffer can #GP. Keep it correct, keep it iconic. 🫢

πŸ‘€ SEE ALSO πŸ‘€


πŸ¦‹ cute lil sign-off: this page comes from ./arch/x86/kernel/fpu, dated October 2026, and it's the xrstors(9) page β€” mwah πŸ’‹

πŸ“¦ where this page comes from