public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: kvm@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
	kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Cc: Oliver Upton <oliver.upton@linux.dev>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>
Subject: Re: [PATCH] KVM: arm64: vgic: Don't hold config_lock while unregistering redistributors
Date: Mon, 19 Aug 2024 17:26:05 +0000	[thread overview]
Message-ID: <172408829924.848017.13221469817768550925.b4-ty@linux.dev> (raw)
In-Reply-To: <20240819125045.3474845-1-maz@kernel.org>

On Mon, 19 Aug 2024 13:50:45 +0100, Marc Zyngier wrote:
> We recently moved the teardown of the vgic part of a vcpu inside
> a critical section guarded by the config_lock. This teardown phase
> involves calling into kvm_io_bus_unregister_dev(), which takes the
> kvm->srcu lock.
> 
> However, this violates the established order where kvm->srcu is
> taken on a memory fault (such as an MMIO access), possibly
> followed by taking the config_lock if the GIC emulation requires
> mutual exclusion from the other vcpus.
> 
> [...]

Tested this w/ kvm-unit-tests, selftests, and a few VMs on a lockdep kernel.

Applied to kvmarm/fixes, thanks!

[1/1] KVM: arm64: vgic: Don't hold config_lock while unregistering redistributors
      https://git.kernel.org/kvmarm/kvmarm/c/f616506754d3

--
Best,
Oliver

      parent reply	other threads:[~2024-08-19 17:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19 12:50 [PATCH] KVM: arm64: vgic: Don't hold config_lock while unregistering redistributors Marc Zyngier
2024-08-19 15:20 ` Zenghui Yu
2024-08-19 17:26 ` Oliver Upton [this message]

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=172408829924.848017.13221469817768550925.b4-ty@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=james.morse@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.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