Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Karl Mehltretter <kmehltretter@gmail.com>
Cc: Oliver Upton <oupton@kernel.org>,
	kvmarm@lists.linux.dev, Fuad Tabba <fuad.tabba@linux.dev>,
	Joey Gouly <joey.gouly@arm.com>,
	Steffen Eiden <seiden@linux.ibm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Shuah Khan <shuah@kernel.org>, Eric Auger <eric.auger@redhat.com>,
	kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] KVM: arm64: vgic-v3: Roll back failed redistributor region setup
Date: Tue, 18 Aug 2026 17:38:57 +0100	[thread overview]
Message-ID: <865x175qou.wl-maz@kernel.org> (raw)
In-Reply-To: <an1cYl928Fue-z3s@gmail.com>

On Thu, 13 Aug 2026 06:57:48 +0100,
Karl Mehltretter <kmehltretter@gmail.com> wrote:
> 
> On Wed, Aug 12, 2026 at 02:57:07PM +0100, Marc Zyngier wrote:
> > On Mon, 10 Aug 2026 22:22:37 +0100,
> > Karl Mehltretter <kmehltretter@gmail.com> wrote:
> > > Is this closer to what you had in mind?
> > 
> > No. I want *all* RDs to be gone on failure, and the next successful
> > registration to result in all possible RDs to be matched against a
> > vcpu if there are enough of them. Effectively an atomic behaviour from
> > the PoV of userspace.
> > 
> > See the patch below for what I came up with.
> > 
> 
> Understood. I believe your sketch needs two small adjustments:
> 
> free_index must be incremented before kvm_io_bus_register_dev().
> If registration fails, the current vCPU already has an RD assignment, but
> there is otherwise no increment for the teardown path to undo.

This probably is a separate patch. I don't think it has anything to do
with the issue at hand.

> 
> The garbage collection in vgic_v3_free_redist_region() should remain.
> VM teardown frees the regions before unregistering the RD iodevs, so
> removing it would leave rdreg pointers referring to freed regions.

Why is this more than just an ordering change? Probably also a
separate patch.

> Does that look OK to you? If so, I could include both in v2.
> I'll also split the selftest change and have it check only the
> final state after the retry.

Sure.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2026-08-18 16:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10  6:52 [RFC PATCH 0/2] KVM: arm64: fix VGICv3 redistributor rollback Karl Mehltretter
2026-08-10  6:52 ` [RFC PATCH 1/2] KVM: arm64: vgic-v3: Roll back failed redistributor region setup Karl Mehltretter
2026-08-10 14:03   ` Marc Zyngier
2026-08-10 21:22     ` Karl Mehltretter
2026-08-12 13:57       ` Marc Zyngier
2026-08-13  5:57         ` Karl Mehltretter
2026-08-18 16:38           ` Marc Zyngier [this message]
2026-08-10  6:52 ` [RFC PATCH 2/2] KVM: arm64: selftests: Test VGICv3 redistributor region retry Karl Mehltretter
2026-08-12 14:45   ` Marc Zyngier

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=865x175qou.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=eric.auger@redhat.com \
    --cc=fuad.tabba@linux.dev \
    --cc=joey.gouly@arm.com \
    --cc=kmehltretter@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=oupton@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seiden@linux.ibm.com \
    --cc=shuah@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --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