Re: [PATCH 2/2] iommupt: Encode IOMMU_MMIO/IOMMU_CACHE via RISC-V Svpbmt bits
From: Nutty.Liu
Date: Sun Apr 12 2026 - 23:24:18 EST
On 4/11/2026 10:22 AM, fangyu.yu@xxxxxxxxxxxxxxxxx wrote:
From: Fangyu Yu <fangyu.yu@xxxxxxxxxxxxxxxxx>Reviewed-by: Nutty Liu <nutty.liu@xxxxxxxxxxx>
When the RISC-V IOMMU page table format support Svpbmt, PBMT provides
a way to tag mappings with page-based memory types. Encode memory type
via PBMT in RISC-V IOMMU PTEs:
- IOMMU_MMIO -> PBMT=IO
- !IOMMU_CACHE -> PBMT=NC
- otherwise -> PBMT=Normal (PBMT=0)
Clear the PBMT field before applying the selected encoding, and only
touch PBMT when PT_FEAT_RISCV_SVPBMT is advertised.
Signed-off-by: Fangyu Yu <fangyu.yu@xxxxxxxxxxxxxxxxx>
---
drivers/iommu/generic_pt/fmt/riscv.h | 9 +++++++++
1 file changed, 9 insertions(+)
Thanks,
Nutty