msi_domain_alloc_irq_at(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

msi_domain_alloc_irq_at(9)

okay so bestie, this one is straight from the Kernel API Manual ✨ and it's literally about grabbing an interrupt from a MSI interrupt domain β€” either at a specific index you pick, or at the next free one. iconic behavior tbh πŸŽ€


✨ NAME ✨

msi_domain_alloc_irq_at β€” Allocate an interrupt from a MSI interrupt domain at a given index β€” or at the next free index πŸ¦‹


πŸ’… SYNOPSIS πŸ’…

here's the signature, character-for-character, no cap:

struct msi_map msi_domain_alloc_irq_at (struct device *dev , unsigned
int domid , unsigned int index , const struct irq_affinity_desc *affdesc
, union msi_instance_cookie *icookie );

🧚 ARGUMENTS 🧚

  • dev β€” Pointer to device struct of the device for which the interrupts are allocated. like, the device we're doing all this for πŸ’–
  • domid β€” Id of the interrupt domain to operate on.
  • index β€” Index for allocation. If index == MSI_ANY_INDEX the allocation uses the next free index. periodt ✨
  • affdesc β€” Optional pointer to an interrupt affinity descriptor structure.
  • icookie β€” Optional pointer to a domain specific per instance cookie. If non-NULL the content of the cookie is stored in msi_desc::data. Must be NULL for MSI-X allocations 🚨
🚨 bestie, listen: icookie Must be NULL for MSI-X allocations. that part is not a vibe suggestion, it's a hard rule πŸ’€

🌸 DESCRIPTION 🌸

This requires a MSI interrupt domain which lets the core code manage the MSI descriptors.

On success msi_map::index contains the allocated index number and msi_map::virq the corresponding Linux interrupt number πŸ‘‘

On failure msi_map::index contains the error code and msi_map::virq is 0.


πŸ’œ RETURN πŸ’œ

struct msi_map β€” that's the return type, bestie 🫢


🌈 SEE ALSO 🌈

go read these too, iykyk:


okay bye bestie πŸ’– β€” source/version: ./kernel/irq Β· date: October 2026 Β· mwah πŸ’‹

πŸ“¦ where this page comes from