Devicetree
 help / color / mirror / Atom feed
* [PATCH v4 0/3] riscv: support effective hardware PTE A/D updates
@ 2026-06-18  6:44 Yunhui Cui
  2026-06-18  6:44 ` [PATCH v4 1/3] dt-bindings: riscv: describe Svadu as disabled at boot Yunhui Cui
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Yunhui Cui @ 2026-06-18  6:44 UTC (permalink / raw)
  To: akpm, alex, andrew+kernel, aou, apatel, apopple, atishp,
	baolin.wang, cleger, conor+dt, cuiyunhui, debug, devicetree,
	guodong, hui.wang, krzk+dt, linux-kernel, linux-riscv,
	liu.xuemei1, namcao, nick.hu, palmer, pincheng.plct, pjw,
	qingwei.hu, ritesh.list, rmclure, robh, wangruikang, zhangchunyan,
	zong.li

This series makes RISC-V track hardware PTE A/D updating by the
effective runtime state instead of treating Svadu discovery alone as
enough.

When both Svade and Svadu are present, Svadu is disabled at boot and
must be enabled through SBI FWFT.  The series enables FWFT PTE A/D
hardware updating on all currently online CPUs before enabling the
global static key, and enables it for later hotplug CPUs early in
smp_callin(), before they are marked online.  If FWFT setup fails, the
kernel falls back to software-managed A/D updates.

It also makes live PTE access/permission updates use cmpxchg-based
merges so that software updates do not lose concurrently
hardware-updated accessed, dirty, or soft-dirty state.

Changes since v3:
- Keep the only-Svadu binding contract as always enabled, and only
  describe the Svade+Svadu boot state as disabled instead of turned-off.
- Detect the need for FWFT from per-CPU Svade state instead of the global
  ISA intersection, so asymmetric Svade/Svadu systems do not skip FWFT.
- Document the secondary-hart FWFT bringup state flow in the commit log.

Yunhui Cui (3):
  dt-bindings: riscv: describe Svadu as disabled at boot
  riscv: track effective hardware PTE A/D updating
  riscv: preserve A/D and soft-dirty state across PTE updates

 .../devicetree/bindings/riscv/extensions.yaml |   2 +-
 arch/riscv/include/asm/cpufeature.h           |   8 ++
 arch/riscv/include/asm/pgtable.h              |  27 +++--
 arch/riscv/kernel/cpufeature.c                | 101 ++++++++++++++++--
 arch/riscv/kernel/smpboot.c                   |   4 +
 arch/riscv/mm/pgtable.c                       |  68 ++++++++++--
 6 files changed, 185 insertions(+), 25 deletions(-)

-- 
2.39.5

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

end of thread, other threads:[~2026-06-18 16:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18  6:44 [PATCH v4 0/3] riscv: support effective hardware PTE A/D updates Yunhui Cui
2026-06-18  6:44 ` [PATCH v4 1/3] dt-bindings: riscv: describe Svadu as disabled at boot Yunhui Cui
2026-06-18 16:37   ` Conor Dooley
2026-06-18  6:44 ` [PATCH v4 2/3] riscv: track effective hardware PTE A/D updating Yunhui Cui
2026-06-18  7:02   ` sashiko-bot
2026-06-18  8:53     ` [External] " yunhui cui
2026-06-18  6:44 ` [PATCH v4 3/3] riscv: preserve A/D and soft-dirty state across PTE updates Yunhui Cui

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