msi_alloc_desc(9)
π msi_alloc_desc(9) β like, the Kernel API Manual page you actually wanna read π
okay so bestie, welcome to msi_alloc_desc(9) from the Kernel API Manual β this is the one that hands you a shiny, already-initialized msi_desc. no cap, it does the setup so you don't have to π
β¨ NAME β¨
msi_alloc_desc β allocate an initialized msi_desc, literally what it says on the tin π«Ά
πΈ SYNOPSIS πΈ
struct msi_desc * msi_alloc_desc (struct device *dev , int nvec , const struct irq_affinity_desc *affinity );
π¦ ARGUMENTS π¦
devβ pointer to the device this desc is being allocated for. it's giving "whose MSI is this anyway" energy πnvecβ the number of vectors used in this entry. count 'em, bestie π’affinityβ an optional pointer to an affinity mask array of sizenvec. optional is the keyword here, it can beNULLand that's valid π
π DESCRIPTION π
so here's the tea β β if affinity is not NULL, then an affinity array[nvec] gets allocated, and the affinity masks and flags from affinity are copied over into it. basically it packs up the affinity vibes and moves them into your new desc β¨
β RETURN β
pointer to the allocated msi_desc on success β or NULL on failure π (check it, fr fr, don't just vibe forward without checking)
π SEE ALSO π
the whole friend group π«Ά β Kernel file ./kernel/irq/msi.c, and then:
struct msi_device_data(9)struct msi_ctrl(9)msi_domain_insert_msi_desc(9)msi_domain_free_msi_descs_range(9)msi_domain_add_simple_msi_descs(9)msi_setup_device_data(9)__msi_lock_descs(9)__msi_unlock_descs(9)msi_domain_first_desc(9)msi_next_desc(9)msi_domain_get_virq(9)msi_device_populate_sysfs(9)msi_device_destroy_sysfs(9)msi_domain_set_affinity(9)msi_create_irq_domain(9)msi_create_parent_irq_domain(9)msi_parent_init_dev_msi_info(9)msi_create_device_irq_domain(9)msi_remove_device_irq_domain(9)msi_match_device_irq_domain(9)msi_domain_alloc_irqs_range_locked(9)msi_domain_alloc_irqs_range(9)msi_domain_alloc_irqs_all_locked(9)msi_domain_alloc_irq_at(9)msi_device_domain_alloc_wired(9)msi_domain_free_irqs_range_locked(9)msi_domain_free_irqs_range(9)msi_domain_free_irqs_all_locked(9)msi_domain_free_irqs_all(9)msi_device_domain_free_wired(9)msi_get_domain_info(9)msi_device_has_isolated_msi(9)
and that's the whole page, bestie π this one lives in ./kernel/irq and the version/date stamp is October 2026 β so bookmark it, screenshot it, send it to the group chat π mwah, go allocate something iconic π
β¨
π¦ 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