根据 riscv 的规范,G-Stage 也就是 Stage-2,GPA->HPA 的映射页表对原本的页表进行了扩展,主要就是增加了两位,比如三级页表,Sv39x4,总共 41 位,而非 Sv39 的 39 位。 <img width="710" height="82" alt="Image" src="https://github.com/user-attachments/assets/fe7d02cd-c32d-47ea-a101-3bb7b6d3cbaa" /> 不同之处在于 Sv39x4 的根页表要求 16KiB 对齐,根页表的索引为 11 位,而非 9 位。 > This is needed by axvisor(riscv64). > https://github.com/arceos-hypervisor/axvisor/issues/303