guest_state_enter_irqoff(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ guest_state_enter_irqoff(9) ✨

okay so this is a page straight out of the Kernel API Manual, and bestie, it's a tiny little function with main character energy πŸ’… like don't let the short signature fool you, it's doing Real Workβ„’


πŸŽ€ NAME πŸŽ€

guest_state_enter_irqoff β€” the lil fixup that gets your state sorted when you're entering a guest 🧚


πŸ¦‹ SYNOPSIS πŸ¦‹

void guest_state_enter_irqoff (void );

🌸 ARGUMENTS 🌸

  • void β€” no arguments, periodt. it takes nothing, it needs nothing, it's that girl 🫢

πŸ’– DESCRIPTION πŸ’–

okay so here's the vibe: when you enter a guest, interrupts are gonna get enabled β€” but when this function gets invoked, the kernel state has interrupts disabled. so yeah, we gotta sort that out. and while we're at it, we tell RCU about it too, because RCU hates being left out of the group chat 😭

here's the little three-step routine, in order:

  1. Trace interrupts on state πŸ‘€
  2. Invoke context tracking if it's enabled, so RCU state gets adjusted ✨
  3. Tell lockdep that interrupts are enabled πŸ”“

this gets invoked from architecture specific code before entering a guest. and it's not optional, bestie β€” it must be called with interrupts disabled, and the caller must be non-instrumentable. no cap. the caller also has to invoke guest_timing_enter_irqoff before this one, so like, sequence matters fr fr πŸ™ˆ

πŸ’€ real talk: interrupts disabled + non-instrumentable caller + guest_timing_enter_irqoff first. skip any of those and it's giving undefined behaviour, and not the cute kind.

πŸ”₯ NOTE πŸ”₯

this is analogous to exit_to_user_mode β€” same energy, different direction πŸŒ€


🌈 SEE ALSO 🌈


and that's the whole page, i fear πŸ’œ it lives in ./include/linux, it's dated October 2026, and it's the guest_state_enter_irqoff(9) manual page β€” go forth and enter your guests responsibly, icon πŸ‘‘β­

πŸ“¦ where this page comes from