[PATCH v1 0/4] riscv: mm: add Svnapot support

panqinglin2020 at iscas.ac.cn panqinglin2020 at iscas.ac.cn
Mon Apr 11 07:15:32 PDT 2022


From: Qinglin Pan <panqinglin2020 at iscas.ac.cn>

Svnapot is a RISC-V extension for marking contiguous 4K pages as a non-4K
page. This patch set is for using Svnapot in Linux Kernel's boot process
and hugetlb fs.

Since Svnapot is just stable recently, and there seems no official way to
determine if the CPU supports Svnapot at runtime. This patchset adds a Kconfig
item for using Svnapot in "Platform type"->"Svnapot support". Its default value
is off, and people can set it on when their CPU supports Svnapot.

Qemu support for Svnapot has been accepted but still not merged into master.
So the qemu which we use to test this patchset is current in this repo (it
contains qemu Svnapot patchset):
https://github.com/plctlab/plct-qemu/tree/plct-virtmem-dev

Tested on:
  - qemu rv64 with "Svnapot support" off.
  - plct-qemu rv64 with "Svnapot support" on.


Qinglin Pan (4):
  mm: modify pte format for Svnapot
  mm: support Svnapot in physical page linear-mapping
  mm: support Svnapot in hugetlb page
  mm: support Svnapot in huge vmap

 arch/riscv/Kconfig                    |  10 +-
 arch/riscv/include/asm/hugetlb.h      |  31 +++-
 arch/riscv/include/asm/page.h         |   2 +-
 arch/riscv/include/asm/pgtable-bits.h |  31 ++++
 arch/riscv/include/asm/pgtable.h      |  68 ++++++++
 arch/riscv/include/asm/vmalloc.h      |  20 +++
 arch/riscv/mm/hugetlbpage.c           | 236 +++++++++++++++++++++++++-
 arch/riscv/mm/init.c                  |  29 +++-
 8 files changed, 416 insertions(+), 11 deletions(-)

-- 
2.35.1




More information about the linux-riscv mailing list