irq_set_irqchip_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… irq_set_irqchip_state β€” kernel API manual (section 9) ✨

okay bestie, so this one lives in section 9 of the Kernel API Manual, and it's genuinely one of those little functions that's doing the most behind the scenes πŸŽ€


🌸 NAME 🌸

irq_set_irqchip_state β€” set the state of a forwarded interrupt. that's it. that's the whole vibe ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

int irq_set_irqchip_state (unsigned int irq , enum irqchip_irq_state
which , bool val );

like, yes it's three args, no it's not scary, keep reading πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • irq β€” the interrupt line that's being forwarded to a VM. this is the star of the show, the main character πŸ‘‘
  • which β€” which state you're restoring, and it's gotta be one of the IRQCHIP_STATE_* values. pick one, no freestyling πŸ™ˆ
  • val β€” the value that corresponds to which. they go together, iykyk πŸ’…

🌈 DESCRIPTION 🌈

so what this call does is set the internal irqchip state of an interrupt, and what exactly it sets depends on the value of which. simple as that, no cap ✨

⚠️ okay this part is important, don't skip it: this function should be called with migration disabled if the interrupt controller has per-cpu registers. fr fr, that's a real caveat, not a suggestion πŸ’€

πŸ’œ SEE ALSO πŸ’œ

the kernel file ./kernel/irq/manage.c (yes, that's where the magic happens 🧚) plus this whole friend group of functions:

like, that's the whole group chat, go say hi 🫢


and that's the page!! πŸŽ‰ this iconic little entry comes from ./kernel/irq and it's dated October 2026 β€” so yeah, it's giving future-core, and it's still irq_set_irqchip_state(9) through and through πŸ’–βœ¨πŸ“

πŸ“¦ where this page comes from