Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Oliver Upton <oupton@kernel.org>
To: Marc Zyngier <maz@kernel.org>
Cc: sashiko-reviews@lists.linux.dev, kvmarm@lists.linux.dev,
	kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Make kvm_io_bus_get_dev() filter devices by ops
Date: Fri, 26 Jun 2026 10:26:06 -0700	[thread overview]
Message-ID: <aj62LqPZg8yHcDww@kernel.org> (raw)
In-Reply-To: <86a4shqxsr.wl-maz@kernel.org>

On Fri, Jun 26, 2026 at 01:41:08PM +0100, Marc Zyngier wrote:
> Gniii... I guess the last option is to bite the bullet and make sure
> that any filtering occurs with the SRCU lock held. Something like the
> patch below. Or just move the locking outside of the helper and keep
> it completely inside the caller.

TBH, I think it makes more sense to have locking done in the caller. We
already have this precondition for calling the other kvm_io_bus*()
accessors anyway.

Then we can drop SRCU once we've gotten down to an object which we know
has a durable lifetime, e.g. the vgic_its struct is valid down to the
last reference on struct kvm.

Thanks,
Oliver

  reply	other threads:[~2026-06-26 17:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26 11:13 [PATCH] KVM: Make kvm_io_bus_get_dev() filter devices by ops Marc Zyngier
2026-06-26 11:46 ` sashiko-bot
2026-06-26 12:41   ` Marc Zyngier
2026-06-26 17:26     ` Oliver Upton [this message]
2026-06-26 13:09 ` Will Deacon

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=aj62LqPZg8yHcDww@kernel.org \
    --to=oupton@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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