STRUCT RISCV_IOMMU_DC(9)
β¨ struct riscv_iommu_dc(9) β¨
okay bestie, welcome to the Kernel API Manual β this is the page for struct riscv_iommu_dc(9), and yes it's giving "tiny struct, big responsibilities" energy π
π NAME π
struct riscv_iommu_dc β the Device Context π«Ά literally what it says on the tin.
πΈ SYNOPSIS πΈ
struct riscv_iommu_dc {
u64 tc;
u64 iohgatp;
u64 ta;
u64 fsc;
u64 msiptp;
u64 msi_addr_mask;
u64 msi_addr_pattern;
u64 _reserved;
};
π Members π
girl, let's go field by field, no skipping, we do not skip in this house π
tcβ Translation Control π₯iohgatpβ I/O Hypervisor guest address translation and protection (that's the Second stage context, iykyk) β¨taβ Translation Attributes πfscβ First stage context πmsiptpβ MSI page table pointer πΈmsi_addr_maskβ MSI address mask πmsi_addr_patternβ MSI address pattern β_reservedβ Reserved for future use, padding π¦ (sitting there being mysterious, we respect it)
π§ Description π§
so this struct is what the leaf nodes on the Device Directory Table use, fr fr. main character energy of the DDT π₯°
but here's the plot twist π β in case RISCV_IOMMU_CAPABILITIES_MSI_FLAT is not set, the bottom 4 fields are not present and are skipped with pointer arithmetic to avoid casting. yep, pointer arithmetic, we love a clever little workaround. you can check out riscv_iommu_get_dc if you wanna see it in action π«
π‘ also: see section 2.1 for more details β the og docs said it, we're saying it.
π SEE ALSO π
Kernel file ./drivers/iommu/riscv/iommu-bits.h enum π and the whole friend group:
riscv_iommu_igs_settings(9)enum riscv_iommu_ddtp_modes(9)enum riscv_iommu_hpmevent_id(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)struct riscv_iommu_msipte(9)
and that's the whole page bestie, you ate that π mwah π
source: ./drivers/iommu/riscv πΈ date: October 2026 πΈ struct riscv_iommu_dc(9) β slay, go read some iommu code now πβ¨
π¦ 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