linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC v7 0/3] riscv: mm: Add soft-dirty and uffd-wp support
@ 2025-04-09  9:53 Chunyan Zhang
  2025-04-09  9:53 ` [PATCH RFC v7 1/3] riscv: Add RISC-V Svrsw60t59b extension support Chunyan Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Chunyan Zhang @ 2025-04-09  9:53 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Andrew Morton,
	Alexandre Ghiti
  Cc: Deepak Gupta, Ved Shanbhogue, linux-riscv, linux-kernel,
	Chunyan Zhang

This patchset adds soft dirty and userfaultfd write protect tracking 
support for RISC-V.

This patchset has been tested with kselftest mm suite in which soft-dirty, 
madv_populate, test_unmerge_uffd_wp, and uffd-unit-tests run and pass,
and no regressions are observed in any of the other tests.

This patchset applies on top of v6.15-rc1.

V7:
- Add Svrsw60t59b [1] extension support;
- Have soft-dirty and uffd-wp depending on the Svrsw60t59b extension to
  avoid crashes for the hardware which don't have this extension.

V6:
- Changes to use bits 59-60 which are supported by extension Svrsw60t59b
  for soft dirty and userfaultfd write protect tracking.

V5:
- Fixed typos and corrected some words in Kconfig and commit message;
- Removed pte_wrprotect() from pte_swp_mkuffd_wp(), this is a copy-paste
  error;
- Added Alex's Reviewed-by tag in patch 2.

V4:
- Added bit(4) descriptions into "Format of swap PTE".

V3:
- Fixed the issue reported by kernel test irobot <lkp@intel.com>.

V1 -> V2:
- Add uffd-wp supported;
- Make soft-dirty uffd-wp and devmap mutually exclusive which all use
  the same PTE bit;
- Add test results of CRIU in the cover-letter.

[1] https://github.com/riscv/Svrsw60t59b.git

Chunyan Zhang (3):
  riscv: Add RISC-V Svrsw60t59b extension support
  riscv: mm: Add soft-dirty page tracking support
  riscv: mm: Add uffd write-protect support

 arch/riscv/Kconfig                    |  15 +++
 arch/riscv/include/asm/hwcap.h        |   1 +
 arch/riscv/include/asm/pgtable-bits.h |  37 +++++++
 arch/riscv/include/asm/pgtable.h      | 136 +++++++++++++++++++++++++-
 arch/riscv/kernel/cpufeature.c        |   1 +
 5 files changed, 188 insertions(+), 2 deletions(-)

-- 
2.34.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-06-13 15:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09  9:53 [PATCH RFC v7 0/3] riscv: mm: Add soft-dirty and uffd-wp support Chunyan Zhang
2025-04-09  9:53 ` [PATCH RFC v7 1/3] riscv: Add RISC-V Svrsw60t59b extension support Chunyan Zhang
2025-06-06 16:58   ` Deepak Gupta
2025-06-12  6:48     ` Chunyan Zhang
2025-06-13 14:09       ` Alexandre Ghiti
2025-04-09  9:53 ` [PATCH RFC v7 2/3] riscv: mm: Add soft-dirty page tracking support Chunyan Zhang
2025-06-06 17:24   ` Deepak Gupta
2025-06-12  6:51     ` Chunyan Zhang
2025-06-12 17:36       ` Deepak Gupta
2025-04-09  9:53 ` [PATCH RFC v7 3/3] riscv: mm: Add uffd write-protect support Chunyan Zhang
2025-06-06 17:30   ` Deepak Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).