Message ID | 20220411141536.2461073-1-panqinglin2020@iscas.ac.cn (mailing list archive) |
---|---|
Headers | show |
Series | riscv: mm: add Svnapot support | expand |
Hi all, Sorry, a correction is needed here. > > 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. > The Svnapot support for QEMU has been merged into master branch. Tests for this patchset can run on it directly now, with cpu option specified like "-cpu rv64,svnapot=true". Thanks, Qinglin > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv
On Mon, 11 Apr 2022 07:15:32 PDT (-0700), panqinglin2020@iscas.ac.cn wrote: > From: Qinglin Pan <panqinglin2020@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(-) Sorry for being slow here, I got pretty buried this round. This generally looks OK, but we definately need dynamic detection. It should be super easy to do that with the new framework, as we essentialy just need to check for Svnapot on allocation. Aside from that, just a minor comment: it feels like Svnapot is simple enough that we should be able to fit it into the generic mapping code. No big deal if it doesn't work and I haven't tried to do so, but I think it's worth a shot.
Hi Palmer, > > Sorry for being slow here, I got pretty buried this round. > > This generally looks OK, but we definately need dynamic detection. It > should be super easy to do that with the new framework, as we essentialy > just need to check for Svnapot on allocation. > Thanks for your comment. I also have the idea to detect Svnapot cpu support dynamically and will do it in next version. > Aside from that, just a minor comment: it feels like Svnapot is simple > enough that we should be able to fit it into the generic mapping code. > No big deal if it doesn't work and I haven't tried to do so, but I think > it's worth a shot. Ok, I will try this in next version too. Yours, Qinglin
From: Qinglin Pan <panqinglin2020@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(-)