[RFC PATCH 01/11] iommupt: Add RISC-V Second-stage (iohgatp) page table support
Jason Gunthorpe
jgg at ziepe.ca
Tue Apr 28 06:32:39 PDT 2026
On Tue, Apr 28, 2026 at 09:13:49PM +0800, fangyu.yu at linux.alibaba.com wrote:
> @@ -263,6 +281,22 @@ riscvpt_iommu_fmt_init(struct pt_iommu_riscv_64 *iommu_table,
> case 57:
> pt_top_set_level(&table->common, 4);
> break;
> + /*
> + * Second-stage (iohgatp): Sv39x4 / Sv48x4 / Sv57x4.
> + * The top level is the same as for the first-stage counterpart.
> + */
> + case 41:
> + pt_top_set_level(&table->common, 2);
> + table->second_stage = true;
> + break;
Second stage needs to be an explicit PT_FEAT not implicitly deduced
based on the vasz.
Jason
More information about the linux-riscv
mailing list