KVM: arm64: nv: Fix stale and duplicate guest S2 tracking entries
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest2 patches 0 repliesNew
Changes in v2 from the cover letter
- Drop the kvm_remove_guest_s2_mappings() change; discard undersized TTL hints in compute_tlb_inval_range() and fall through to the unhinted path (Marc Zyngier).
- Split duplicate suppression in kvm_record_guest_s2_mapping() into a separate patch, call kfree() under guard(spinlock), and drop the Fixes tag (Wei-Lin Chang).
- Rewrite the commit messages and cover letter.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | KVM: arm64: nv: Discard undersized TTL hints in compute_tlb_inval_range()arch/ | +55 | 0 replies | |
| 2/2 | KVM: arm64: nv: Avoid duplicate guest stage-2 mapping entriesarch/ | +29 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] KVM: arm64: nv: Fix stale and duplicate guest S2 tracking entries
When an L1 guest issues TLBI IPAS2E1 with a TTL hint smaller than the actual mapping, KVM clears the entire block from the shadow stage-2 page table while leaving the stale tracking entry in guest_s2_mappings. Patch 1 drops undersized TTL hints in compute_tlb_inval_range() and falls through to the unhinted path so the unmap and tracking removal cover the same range. This follows Marc's suggestion [2] on Dan Carpenter's sub-page TTL patch [1] (which Patch 1 overlaps with and subsumes), fixing WARN_ON(size & ~PAGE_MASK) on 16kB/64kB hosts as well.
Patch 2 avoids inserting identical duplicate entries in kvm_record_guest_s2_mapping().
Tool-generated content:
- Initial bug discovery: automated LLM-assisted audit of the arm64 nested stage-2 tracking code.
- Patch and text drafting: interactive Gemini session (patches, commit messages, and cover letter).
Changes since v1:
- Drop the kvm_remove_guest_s2_mappings() change; discard undersized TTL hints in compute_tlb_inval_range() and fall through to the unhinted path (Marc Zyngier).
- Split duplicate suppression in kvm_record_guest_s2_mapping() into a separate patch, call kfree() under guard(spinlock), and drop the Fixes tag (Wei-Lin Chang).
- Rewrite the commit messages and cover letter.
Link to v1: https://lore.kernel.org/r/[email protected]
[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]
Colton Lewis (2):
KVM: arm64: nv: Discard undersized TTL hints in
compute_tlb_inval_range()
KVM: arm64: nv: Avoid duplicate guest stage-2 mapping entries
arch/arm64/kvm/nested.c | 105 ++++++++++++++++++++++++++++++++-------- 1 file changed, 84 insertions(+), 21 deletions(-)
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
Signature · 1 line
2.56.1.839.g22a8290db9-goog