irq_set_vcpu_affinity(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– irq_set_vcpu_affinity(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual, section 9 β€” this one's all about irq_set_vcpu_affinity, and no cap it's a whole vibe.


✨ NAME ✨

irq_set_vcpu_affinity β€” set vcpu affinity for the interrupt πŸŽ€


🌸 SYNOPSIS 🌸

int irq_set_vcpu_affinity (unsigned int irq , void *vcpu_info );

like, that's the whole signature, look at her go πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • irq β€” the interrupt number you're setting affinity for. this is the main character of the operation ngl πŸ”₯
  • vcpu_info β€” vCPU specific data, or a pointer to a percpu array of vCPU specific data for percpu_devid interrupts. two moods, one pointer, iykyk ✨

πŸ’œ DESCRIPTION πŸ’œ

so what she does: this function uses that vCPU specific data to set the vCPU affinity for an irq. the vCPU specific data is passed in from outside, like from KVM β€” it doesn't magically appear, someone hands it over 🫢

one example code path is literally this, and it's giving relay race:

KVM -> IOMMU -> irq_set_vcpu_affinity

KVM hands it off, IOMMU carries the baton, and irq_set_vcpu_affinity crosses the finish line. slay πŸ’…


🌈 SEE ALSO 🌈

Kernel file ./kernel/irq/manage.c β€” and like, the whole friend group:

the way that's literally the entire irq squad πŸ˜­πŸ’–


okay that's the page!! this one came straight out of ./kernel/irq, dated October 2026, so shoutout to the source for keeping it iconic β€” go read it, it ate πŸŒŸπŸ‘‘πŸ’€βœ¨

πŸ“¦ where this page comes from