The sPAPR TCE hypercalls run in preemptible virtual mode and may race
with concurrent TCE table fd release or VFIO IOMMU group detachment.

This series addresses the parent TCE table lifetime, synchronizes IOMMU
table access with detach, and ensures safe child-table reclamation.

Changes log:
v1:
  - Revisited the Fixes tag for IOMMU table traversal and 
    used 121f80ba68f1.(Ritesh Harjani) 
  - Added parent TCE table reference counting and SRCU
    synchronization with fd release.
  - Added SRCU-protected child-table traversal and synchronization
    with VFIO detach.
  - Added SRCU-aware reclamation to prevent child-table
    use-after-free.
  - The partial IOMMU mapping rollback issue will be addressed
    in a separate follow-up patch.(Sashiko Review)

Narayana Murty N (3):
  KVM: PPC: Book3S: Hold a reference to sPAPR TCE tables during hcalls
  KVM: PPC: Book3S: Synchronize TCE hcalls with IOMMU table detach
  KVM: PPC: Book3S: Free child IOMMU tables after an SRCU grace period

 arch/powerpc/include/asm/kvm_host.h |   2 +
 arch/powerpc/kvm/book3s_64_vio.c    | 179 +++++++++++++++++++++-------
 2 files changed, 141 insertions(+), 40 deletions(-)

-- 
2.54.0


Reply via email to