diff options
| author | Jinyu Tang <tjytimi@163.com> | 2026-05-17 18:34:25 +0300 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-06-03 15:49:57 +0300 |
| commit | 7dd416fdd3fba2095c3cea58e36f8ee5d86dadc3 (patch) | |
| tree | 7025e871cb18982a395ae128da543fceb043c701 /scripts/basic | |
| parent | cc98f006c63c8e9f825ca5f89388fe5ace6a5c74 (diff) | |
| download | linux-7dd416fdd3fba2095c3cea58e36f8ee5d86dadc3.tar.xz | |
KVM: riscv: Add a G-stage PTE cmpxchg helper
Permission-only G-stage PTE updates can run in parallel once they are
moved to the read side of mmu_lock. Plain set_pte() is not enough for
that case because another CPU may update the same PTE first.
x86 handles the same class of SPTE races with cmpxchg-based updates in
its fast page fault and TDP MMU paths. Add a small RISC-V helper for
atomic G-stage PTE updates. The helper reports contention to the caller
and flushes the target range only when the PTE value actually changes.
Signed-off-by: Jinyu Tang <tjytimi@163.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260517153427.94889-4-tjytimi@163.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
