STRUCT RISCV_IOMMU_MSIPTE(9)
β¨ struct riscv_iommu_msipte(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's a little struct page, and it's honestly giving "small but crucial" energy. let's get into it π
πΈ NAME πΈ
struct riscv_iommu_msipte β literally the MSI Page Table Entry. that's the whole vibe. β¨
π¦ SYNOPSIS π¦
here's the whole thing, and yes it's only two fields, she's compact and she knows it π
struct riscv_iommu_msipte {
u64 pte;
u64 mrif_info;
};
π MEMBERS π
pteβ the MSI PTE itself. the main character of the struct ngl πmrif_infoβ the memory-resident interrupt file info. think of it as the little side-pocket field π«Ά
π DESCRIPTION π
so the MSI Page Table is what you use to virtualize MSIs β¨ and the way that works is: when a device fires off an MSI at a guest, the IOMMU can reroute it by translating the MSI address β and it can send it either to a guest interrupt file or to a memory resident interrupt file (MRIF). either way, she's rehoming that interrupt, no cap π
β οΈ important detail bestie: this page table is an array of MSI PTEs, not a multi-level pt. every single entry is a leaf entry. so don't go looking for levels, there are none π
for more infos (yes, for more infos, that's the lore π) check out the AIA spec, chapter 9.5. that's where the real reading happens π
π the basic mode situation π
okay so in basic mode, the IOMMU straight up ignores the mrif_info field β so it's free real estate for software to use however it wants π lowkey the best kind of field.
π but here's the caveat and it's fr fr serious: any other reserved fields on pte must be zeroed-out by software. not optional, not a vibe check you can skip. zero them out. π
β SEE ALSO β
- Kernel file
./drivers/iommu/riscv/iommu-bits.henum riscv_iommu_igs_settings(9)enum riscv_iommu_ddtp_modes(9)enum riscv_iommu_hpmevent_id(9)struct riscv_iommu_dc(9)enum riscv_iommu_dc_iohgatp_modes(9)enum riscv_iommu_dc_fsc_atp_modes(9)struct riscv_iommu_pc(9)struct riscv_iommu_command(9)struct riscv_iommu_fq_record(9)enum riscv_iommu_fq_causes(9)enum riscv_iommu_fq_ttypes(9)struct riscv_iommu_pq_record(9)
and that's the page!! π¦ go read chapter 9.5 of the AIA spec and remember to zero your reserved bits, i'm literally begging π
signed off with love from ./drivers/iommu/riscv, dated October 2026 β catch you in the next struct, bestie πβ¨π
π¦ 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