Skip to content

KVM: x86/mmu: Clean up indirect_shadow_pages usage

Sean Christopherson kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest4 patches 3 repliesIn review

Changes in v2 from the cover letter

- Drop the unnecessary READ_ONCE(). [Jim]
- Cleanup more old crud in reexecute_instruction().
- Fix the aforementioned race.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4KVM: x86/mmu: Don't acquire mmu_lock when using indirect_shadow_pages as a heuristicarch/x86/kvm/x86.c+1 -70 replies
2/4KVM: x86: Drop dedicated logic for direct MMUs in reexecute_instruction()arch/x86/kvm/x86.c+16 -160 replies
3/4KVM: x86: Drop superfluous check on direct MMU vs. WRITE_PF_TO_SP flagarch/x86/kvm/x86.c+1 -20 replies
4/4KVM: x86/mmu: Fix a *very* theoretical race in kvm_mmu_track_write()arch/x86/kvm/mmu/mmu.c+16 -32 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] KVM: x86/mmu: Clean up indirect_shadow_pages usage

Resurrect a 6 month old patch from Mingwei, add a few cleanps on top, and fix a largely theoretical race between emulating writes and write-protecting shadow pages. At least, I'm pretty sure there's a race. Memory ordering isn't exactly my strong suit.

v2:
- Drop the unnecessary READ_ONCE(). [Jim]
- Cleanup more old crud in reexecute_instruction().
- Fix the aforementioned race.

v1: https://lore.kernel.org/all/[email protected]

Mingwei Zhang (1):
KVM: x86/mmu: Don't acquire mmu_lock when using indirect_shadow_pages
as a heuristic

Sean Christopherson (3):
KVM: x86: Drop dedicated logic for direct MMUs in
reexecute_instruction()
KVM: x86: Drop superfluous check on direct MMU vs. WRITE_PF_TO_SP flag
KVM: x86/mmu: Fix a *very* theoretical race in kvm_mmu_track_write()

 arch/x86/kvm/mmu/mmu.c | 19 ++++++++++++++++---
 arch/x86/kvm/x86.c     | 35 ++++++++++++++---------------------
 2 files changed, 30 insertions(+), 24 deletions(-)

base-commit: 60eedcfceda9db46f1b333e5e1aa9359793f04fb

Signature · 1 line
2.43.0.594.gd9cf4e227d-goog