mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Narayana Murty N <nnmlinux@linux.ibm.com>
To: Ritesh Harjani <ritesh.list@gmail.com>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org
Cc: Nicholas Piggin <npiggin@gmail.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Christophe Leroy <chleroy@kernel.org>,
	Shrikanth Hegde <sshegde@linux.ibm.com>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	Narayana Murty N <nnmlinux@linux.ibm.com>,
	linux-kernel@vger.kernel.org, sbhat@linux.ibm.com,
	harshpb@linux.ibm.com
Subject: [PATCH v2 0/3] KVM: PPC: Book3S: Protect TCE IOMMU table walks with RCU
Date: Thu, 26 Nov 2026 14:13:52 +0530	[thread overview]
Message-ID: <20261126084351.32375-5-nnmlinux@linux.ibm.com> (raw)

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	other threads:[~2026-11-26  8:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  8:43 Narayana Murty N [this message]
2026-11-26  8:50 ` [PATCH v2 1/3] KVM: PPC: Book3S: Hold a reference to sPAPR TCE tables during hcalls Narayana Murty N
2026-11-26  8:50   ` [PATCH v2 2/3] KVM: PPC: Book3S: Synchronize TCE hcalls with IOMMU table detach Narayana Murty N
2026-11-26  8:50   ` [PATCH v2 3/3] KVM: PPC: Book3S: Free child IOMMU tables after an SRCU grace period Narayana Murty N

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261126084351.32375-5-nnmlinux@linux.ibm.com \
    --to=nnmlinux@linux.ibm.com \
    --cc=aik@ozlabs.ru \
    --cc=chleroy@kernel.org \
    --cc=harshpb@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=ritesh.list@gmail.com \
    --cc=sbhat@linux.ibm.com \
    --cc=sshegde@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®