guest_state_enter_irqoff(9)
β¨ 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:
- Trace interrupts on state π
- Invoke context tracking if it's enabled, so RCU state gets adjusted β¨
- 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 π
- Kernel file
./include/linux/kvm_host.h guest_state_exit_irqoff(9)kvm_gpc_init(9)kvm_gpc_activate(9)kvm_gpc_activate_hva(9)kvm_gpc_check(9)kvm_gpc_refresh(9)kvm_gpc_deactivate(9)kvm_stats_linear_hist_update(9)kvm_stats_log_hist_update(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms