public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH V2 0/3] riscv: mm: Add soft-dirty and uffd-wp support
@ 2024-07-31  4:04 Chunyan Zhang
  2024-07-31  4:04 ` [PATCH V2 1/3] riscv: mm: Prepare for reuse PTE RSW bit(9) Chunyan Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Chunyan Zhang @ 2024-07-31  4:04 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Andrew Morton,
	Alexandre Ghiti
  Cc: linux-riscv, linux-kernel, Chunyan Zhang

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

As described in the patches, we are trying to utilize only one free PTE bit to
support three kernel features (devmap, soft-dirty,uffd-wp). Users cannot have
them supported at the same time (have to select one when building the kernel).

This patchset has been tested with:
1) The 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.

2) CRIU:
- 'criu check --feature mem_dirty_track' returns supported
- incremental_dumps works fine
- zdtm test suite can run under host mode

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.

Chunyan Zhang (3):
  riscv: mm: Prepare for reuse PTE RSW bit(9)
  riscv: mm: Add soft-dirty page tracking support
  riscv: mm: Add uffd write-protect support

 arch/riscv/Kconfig                    |  34 ++++++-
 arch/riscv/include/asm/pgtable-64.h   |   2 +-
 arch/riscv/include/asm/pgtable-bits.h |  31 ++++++
 arch/riscv/include/asm/pgtable.h      | 132 +++++++++++++++++++++++++-
 4 files changed, 196 insertions(+), 3 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] 7+ messages in thread

end of thread, other threads:[~2024-08-04  1:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31  4:04 [PATCH V2 0/3] riscv: mm: Add soft-dirty and uffd-wp support Chunyan Zhang
2024-07-31  4:04 ` [PATCH V2 1/3] riscv: mm: Prepare for reuse PTE RSW bit(9) Chunyan Zhang
2024-07-31  4:04 ` [PATCH V2 2/3] riscv: mm: Add soft-dirty page tracking support Chunyan Zhang
2024-08-02 21:22   ` kernel test robot
2024-08-03 14:54   ` kernel test robot
2024-08-04  1:52   ` kernel test robot
2024-07-31  4:04 ` [PATCH V2 3/3] riscv: mm: Add uffd write-protect support Chunyan Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox