STRUCT PCI_EPF_DOORBELL_MSG(9)
π 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 forrequest_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'sNO_BAR. keep that in mind okay. πoffsetβ the offset withinbarfor the doorbell target. β οΈ this one is only valid iffbar != NO_BARβ οΈ β so don't come for me if you read it when it'sNO_BAR, that's on you. πiova_baseβ Internal: the base DMA address thatdma_map_resourcereturned for the embedded doorbell MMIO window. it's used only for unmapping, so don't get any ideas. valid whentypeisPCI_EPF_DOORBELL_EMBEDDEDandiova_sizeis non-zero. π§iova_sizeβ Internal: the size of thedma_map_resourcemapping atiova_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
- 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