KVM: arm64: Standardize debugfs iterators
Status from this message: Applied to next, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | KVM: arm64: Use standard seq_file iterator for idregs debugfsarch/ arch/ | +8 | 0 replies | |
| 2/3 | KVM: arm64: Reimplement vgic-debug XArray iterationarch/ include/ | +20 | 0 replies | |
| 3/3 | KVM: arm64: Use standard seq_file iterator for vgic-debug debugfsarch/ include/ | +12 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH v1 0/3] KVM: arm64: Standardize debugfs iterators
This series refactors the debugfs implementations for idregs and vgic-state to use standard seq_file iterator patterns.
The existing implementations relied on storing iterator state within global VM structures (kvm_arch and vgic_dist). This approach prevented concurrent reads of the debugfs files (returning -EBUSY) and created improper dependencies between transient file operations and long-lived VM state.
The vgic-debug implementation relied on an XArray marking mechanism to snapshot LPIs during iteration. This modified global state during read operations and could lead to reference counting leaks in certain edge cases.
Note that vgic-its-debug (for ITS tables) also uses a custom iterator pattern, but it is not addressed in this series. Unlike vgic-state, the ITS debug interface iterates over linked lists (device_list and itt_head) which require holding the its_lock for safety. Converting it to a lockless iterator would require a more invasive refactoring of the ITS data structures (e.g., to RCU or XArray), which is outside the scope of this cleanup.
Based on Linux 6.19-rc7.
Cheers,
/fuad
Fuad Tabba (3):
KVM: arm64: Use standard seq_file iterator for idregs debugfs
KVM: arm64: Reimplement vgic-debug XArray iteration
KVM: arm64: Use standard seq_file iterator for vgic-debug debugfs
arch/arm64/include/asm/kvm_host.h | 3 - arch/arm64/kvm/sys_regs.c | 50 +++----------- arch/arm64/kvm/vgic/vgic-debug.c | 108 +++++++++--------------------- include/kvm/arm_vgic.h | 4 -- 4 files changed, 40 insertions(+), 125 deletions(-)
base-commit: 63804fed149a6750ffd28610c5c1c98cce6bd377
Signature · 1 line
2.53.0.rc1.225.gd81095ad13-goog