ENUM RISCV_IOMMU_DC_IOHGATP_MODES(9)
π enum riscv_iommu_dc_iohgatp_modes(9) π
okay so bestie, we're in the Kernel API Manual and this page is literally about the guest address translation/protection modes β the enum enum riscv_iommu_dc_iohgatp_modes, no cap π
πΈ NAME πΈ
enum riscv_iommu_dc_iohgatp_modes β guest address translation/protection modes, and yes that's the whole vibe π¦
β¨ SYNOPSIS β¨
here's the whole squad, look at them:
enum riscv_iommu_dc_iohgatp_modes {
RISCV_IOMMU_DC_IOHGATP_MODE_BARE ,
RISCV_IOMMU_DC_IOHGATP_MODE_SV32X4 ,
RISCV_IOMMU_DC_IOHGATP_MODE_SV39X4 ,
RISCV_IOMMU_DC_IOHGATP_MODE_SV48X4 ,
RISCV_IOMMU_DC_IOHGATP_MODE_SV57X4
};
π Constants π
bestie these are the constants, one by one, let me introduce you π
RISCV_IOMMU_DC_IOHGATP_MODE_BAREβ no translation/protection. that's it, that's the mode. nothing happening, zero drama, we love a minimalist πRISCV_IOMMU_DC_IOHGATP_MODE_SV32X4β Sv32x4 (the 2-bit extension of Sv32), and it kicks in whenfctl.GXL == 1. clock that condition, it matters π₯RISCV_IOMMU_DC_IOHGATP_MODE_SV39X4β Sv39x4 (2-bit extension of Sv39), whenfctl.GXL == 0. note the0, not a1, okurrr βRISCV_IOMMU_DC_IOHGATP_MODE_SV48X4β Sv48x4 (2-bit extension of Sv48), whenfctl.GXL == 0. same condition, bigger numbers, iconic behavior πRISCV_IOMMU_DC_IOHGATP_MODE_SV57X4β Sv57x4 (2-bit extension of Sv57), whenfctl.GXL == 0. the biggest one, main character energy, stillfctl.GXL == 0though π§
ngl bestie thefctl.GXLcondition is doing a LOT of work here β1means Sv32x4,0means the rest. don't mix that up or it's giving "undefined chaos" π
π¦ SEE ALSO π¦
go read these next, they're all in the same friend group π
- Kernel file
./drivers/iommu/riscv/iommu-bits.henumriscv_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_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)
okay that's the whole page bestie, you ate that π this one lives in ./drivers/iommu/riscv, dated October 2026, and it's filed under enum riscv_...ohgatp_modes(9) β mwah, go slay some address translation ππ
π¦ 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