irq_set_irqchip_state(9)
π 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 theIRQCHIP_STATE_*values. pick one, no freestyling πvalβ the value that corresponds towhich. 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:
synchronize_hardirq(9)synchronize_irq(9)irq_can_set_affinity(9)irq_can_set_affinity_usr(9)irq_set_thread_affinity(9)irq_affinity_schedule_notify_work(9)irq_update_affinity_desc(9)irq_set_affinity(9)irq_force_affinity(9)irq_set_affinity_notifier(9)irq_set_vcpu_affinity(9)disable_irq_nosync(9)disable_irq(9)disable_hardirq(9)disable_nmi_nosync(9)enable_irq(9)enable_nmi(9)irq_set_irq_wake(9)irq_wake_thread(9)free_irq(9)request_threaded_irq(9)request_any_context_irq(9)request_nmi(9)irq_percpu_is_enabled(9)free_percpu_irq(9)request_percpu_irq_affinity(9)request_percpu_nmi(9)prepare_percpu_nmi(9)teardown_percpu_nmi(9)irq_get_irqchip_state(9)irq_has_action(9)irq_check_status_bit(9)
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
- 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