[PATCH 0/2] KVM: x86/mmu: Fix unsync races within TDP MMU

From: Sean Christopherson
Date: Tue Aug 10 2021 - 18:46:05 EST


Patch 1 fixes a bug where concurrent TDP MMU page faults can "corrupt" the
unsync shadow page fields, notably unsync_children, as the TDP MMU holds
mmu_lock for read and the unsync logic is not thread safe.

Patch 2 is a tangentially related cleanup.

Sean Christopherson (2):
KVM: x86/mmu: Protect marking SPs unsync when using TDP MMU with
spinlock
KVM: x86/mmu: Drop 'shared' param from tdp_mmu_link_page()

Documentation/virt/kvm/locking.rst | 8 +++----
arch/x86/include/asm/kvm_host.h | 3 +++
arch/x86/kvm/mmu/mmu.c | 36 ++++++++++++++++++++++++++++--
arch/x86/kvm/mmu/mmu_internal.h | 3 ++-
arch/x86/kvm/mmu/spte.c | 4 ++--
arch/x86/kvm/mmu/spte.h | 2 +-
arch/x86/kvm/mmu/tdp_mmu.c | 20 +++++------------
7 files changed, 52 insertions(+), 24 deletions(-)

--
2.32.0.605.g8dce9f2422-goog