diff options
| author | Jinyu Tang <tjytimi@163.com> | 2026-05-17 18:34:26 +0300 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-06-03 15:50:01 +0300 |
| commit | d7a26a0ba71542c9778d7d802dc79b0874f852bf (patch) | |
| tree | 0e4adaeb432f4318bd9edb2c82be203cbfcb2328 /scripts | |
| parent | 7dd416fdd3fba2095c3cea58e36f8ee5d86dadc3 (diff) | |
| download | linux-d7a26a0ba71542c9778d7d802dc79b0874f852bf.tar.xz | |
KVM: riscv: Update G-stage PTE permissions atomically
When a fault hits an existing G-stage leaf with the same PFN, KVM only
needs to update the PTE permissions. This path will be used by read-side
fault handling, so it must not overwrite a concurrent PTE update.
Use the cmpxchg helper when relaxing permissions on an existing leaf,
following the same concurrency model used by x86 for atomic SPTE
permission updates. Retry if another CPU changed the PTE first, and use
cpu_relax() while spinning.
Signed-off-by: Jinyu Tang <tjytimi@163.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260517153427.94889-5-tjytimi@163.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
