STRUCT PCI_EPF_DOORBELL_MSG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct pci_epf_doorbell_msg(9) β€” the kernel API manual, bestie edition πŸ’–

okay so this is a page from the Kernel API Manual, and today's main character is struct pci_epf_doorbell_msg. yes it's a struct, yes it's about doorbells (the interrupt kind, not the Ring kind πŸ””), and yes we're gonna get into it.


✨ NAME ✨

struct pci_epf_doorbell_msg β€” literally just represents a doorbell message. that's the whole vibe. πŸ›ŽοΈ


🌸 SYNOPSIS 🌸

here's the shape of it, bestie, copy it exactly:

struct pci_epf_doorbell_msg {
    struct msi_msg msg;
    int virq;
    unsigned long irq_flags;
    enum pci_epf_doorbell_type type;
    enum pci_barno bar;
    resource_size_t offset;
    dma_addr_t iova_base;
    size_t iova_size;
 };

πŸŽ€ Members πŸŽ€

bestie. sit down. we're doing a member-by-member breakdown and it's giving thorough. πŸ’…

  • msg β€” the doorbell address/data pair that gets mapped into BAR space. so like, for MSI-backed doorbells this is the MSI message, but for "embedded" doorbells it's actually an MMIO write that asserts an interrupt on the EP side. two vibes, one field. πŸ¦‹
  • virq β€” the IRQ number of this doorbell message. that's it, that's the field. ✨
  • irq_flags β€” the flags you need for request_irq/request_threaded_irq. callers are allowed to OR-in extra flags on top (e.g. IRQF_ONESHOT) β€” very generous of them ngl. πŸ”₯
  • type β€” the doorbell type. yep. πŸŽ€
  • bar β€” the BAR number where the doorbell target is already exposed to the RC. if it's not exposed, it's NO_BAR. keep that in mind okay. πŸ‘‘
  • offset β€” the offset within bar for the doorbell target. ⚠️ this one is only valid iff bar != NO_BAR ⚠️ β€” so don't come for me if you read it when it's NO_BAR, that's on you. 😭
  • iova_base β€” Internal: the base DMA address that dma_map_resource returned for the embedded doorbell MMIO window. it's used only for unmapping, so don't get any ideas. valid when type is PCI_EPF_DOORBELL_EMBEDDED and iova_size is non-zero. 🧚
  • iova_size β€” Internal: the size of the dma_map_resource mapping at iova_base. it's zero when no mapping was created (e.g. a pre-exposed fixed BAR). zero = no mapping, no cap. πŸ’€

🌈 SEE ALSO 🌈

go touch grass in the kernel source, specifically:

Kernel file ./include/linux/pci-epf.h

and then these absolute icons:

struct pci_epf_header(9), struct pci_epf_ops(9), struct pci_epc_event_ops(9), struct pci_epf_driver(9), struct pci_epf_bar_submap(9), struct pci_epf_bar(9), struct pci_epf(9), struct pci_epf_msix_tbl(9)


fr fr read the whole friend group, they all connect. iykyk 🫢

okay that's the page!! πŸŽ‰ source is ./include/linux, dated October 2026, and the page itself is struct pci_epf_doorbell_msg(9) β€” slay, goodbye, go map some doorbells responsibly πŸ’œβ­πŸŒΈ

πŸ“¦ where this page comes from