KVM: x86/mmu: Use LOCK CMPXCHG to clear Accessed bits
Status from this message: Applied to kvm-x86 mmu, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | KVM: x86/mmu: Use CMPXCHG when clearing Accessed bit in TDP MMUarch/ arch/ | +16 | 2 replies | |
| 2/2 | KVM: x86/mmu: Use CMPXCHG when clearing Accessed bit in the shadow MMUarch/ | +14 | 2 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | James Houghton | Kai Huang |
|---|---|---|
| 1/2 | R-b | R-b |
| 2/2 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] KVM: x86/mmu: Use LOCK CMPXCHG to clear Accessed bits
Use LOCK CMPXCHG instead of LOCK AND or LOCK BTR to clear Accessed bits when aging SPTEs, as LOCK AND could clobber a !PRESENT SPTE. Specificaly, as flagged by AI of some kind, a LOCK AND in the TDP MMU could clobber a FROZEN_SPTE and ultimately result in a false negative since the Accessed bit is included in FROZEN_SPTE.
I initially was planning on tweaking the FROZEN_SPTE value to make it ok to use LOCK AND on Accessed bits, but AFAICT there's no meaningful downside to using CMPXCHG.
Sean Christopherson (2):
KVM: x86/mmu: Use CMPXCHG when clearing Accessed bit in TDP MMU
KVM: x86/mmu: Use CMPXCHG when clearing Accessed bit in the shadow MMU
arch/x86/kvm/mmu/mmu.c | 27 ++++++++++++++------------- arch/x86/kvm/mmu/tdp_iter.h | 7 +++++++ arch/x86/kvm/mmu/tdp_mmu.c | 20 +++++++++----------- 3 files changed, 30 insertions(+), 24 deletions(-)
base-commit: 271255273d5ff348fe29d89fe4712b2f7f7907c3
Signature · 1 line
2.55.0.229.g6434b31f56-goog