RISC-V: Add Sv57 page table support

This implements Sv57 support at runtime. The kernel will try to boot
with 5-level page table firstly , and will fallback to 4-level if the HW
does not support it. And it will finally fallback to 3-level if the HW
alse does not support sv48.

* riscv-sv57:
  riscv: mm: Support kasan for sv57
  riscv: mm: Set sv57 on defaultly
  riscv: mm: Prepare pt_ops helper functions for sv57
  riscv: mm: Control p4d's folding by pgtable_l5_enabled
This commit is contained in:
Palmer Dabbelt 2022-02-22 09:40:52 -08:00
commit 9195c294bc
No known key found for this signature in database
GPG key ID: 2E1319F35FBB1889
10 changed files with 451 additions and 42 deletions