public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel•org>
To: "Woodhouse, David" <dwmw@amazon•co.uk>
Cc: "kvm@vger•kernel.org" <kvm@vger•kernel.org>,
	"shuah@kernel•org" <shuah@kernel•org>,
	"yuzenghui@huawei•com" <yuzenghui@huawei•com>,
	"joey.gouly@arm•com" <joey.gouly@arm•com>,
	"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
	"catalin.marinas@arm•com" <catalin.marinas@arm•com>,
	"nathan@kernel•org" <nathan@kernel•org>,
	"pbonzini@redhat•com" <pbonzini@redhat•com>,
	"kvmarm@lists•linux.dev" <kvmarm@lists•linux.dev>,
	"arnd@arndb•de" <arnd@arndb•de>,
	"kees@kernel•org" <kees@kernel•org>,
	"will@kernel•org" <will@kernel•org>,
	"suzuki.poulose@arm•com" <suzuki.poulose@arm•com>,
	"oupton@kernel•org" <oupton@kernel•org>,
	"rananta@google•com" <rananta@google•com>,
	"linux-arm-kernel@lists•infradead.org"
	<linux-arm-kernel@lists•infradead.org>,
	"linux-kselftest@vger•kernel.org"
	<linux-kselftest@vger•kernel.org>,
	"eric.auger@redhat•com" <eric.auger@redhat•com>
Subject: Re: [PATCH 2/3] KVM: arm64: vgic: Allow userspace to set IIDR revision 1
Date: Thu, 09 Apr 2026 14:45:09 +0100	[thread overview]
Message-ID: <86v7e02qoq.wl-maz@kernel.org> (raw)
In-Reply-To: <ffe9de5106d999365389c3ab17f357409dac1047.camel@amazon.co.uk>

On Wed, 08 Apr 2026 09:39:15 +0100,
"Woodhouse, David" <dwmw@amazon•co.uk> wrote:
> 
> [1  <multipart/signed (en-US) (7bit)>]
> [1.1  <text/plain; UTF-8 (quoted-printable)>]
> On Wed, 2026-04-08 at 08:54 +0100, Marc Zyngier wrote:
> > On Tue, 07 Apr 2026 21:27:03 +0100,
> > David Woodhouse <dwmw2@infradead•org> wrote:
> > > 
> > > From: David Woodhouse <dwmw@amazon•co.uk>
> > > 
> > > Allow userspace to select GICD_IIDR revision 1, which restores the
> > > original pre-d53c2c29ae0d ("KVM: arm/arm64: vgic: Allow configuration
> > > of interrupt groups") behaviour where interrupt groups are not
> > > guest-configurable.
> > 
> > I'm a bit surprised by this.
> > 
> > Either your guest knows that the group registers are not writable and
> > already deals with the buggy behaviour by not configuring the groups
> > (or configuring them in a way that matches what the implementation
> > does). Or it configures them differently and totally fails to handle
> > the interrupts as they are delivered using the wrong exception type,
> > if at all.
> > 
> > I'd expect that your guests fall in the former category and not the
> > latter, as we'd be discussing a very different problem. And my vague
> > recollection of this issue is that we had established that as long as
> > the reset values were unchanged, there was no harm in letting things
> > rip.
> 
> What if the guest boots under a new host kernel and finds the group
> registers are writable, and then is live migrated to an old host kernel
> on which they are not?

That's your problem. KVM/arm64 never supported downgrading.

Not to mention that there is no valid GIC implementation that has RO
group registers. All you are doing is to inflict a hypervisor bug on
unsuspecting guests, for no good reason.

> What about hibernation, if the *boot* kernel in the guest configures
> the groups, but then transfers control back to the resumed guest kernel
> which had not?

A guest that doesn't configures the groups cannot expect anything to
work. You'd have the exact same problem on bare-metal.

> 
> > So what is this *really* fixing?
> 
> I look at that question the other way round.
> 
> KVM has an established procedure for allowing userspace to control
> guest-visible changes, using the IIDR. First the host kernel which
> *supports* the change is rolled out, and only then does the VMM start
> to enable it for new launches.
> 
> Even if we can address the questions above, and even if we can convince
> ourselves that those are the *only* questions to ask... why not follow
> the normal, safe, procedure? Especially given that there is already an
> IIDR value which corresponds to it.
> 
> We don't *have* to YOLO it... and I don't want to :)

That's hardly an argument, is it?

	M.

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


  reply	other threads:[~2026-04-09 13:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 20:27 [PATCH 0/3] KVM: arm64: vgic: Fix IIDR revision handling and add revision 1 David Woodhouse
2026-04-07 20:27 ` [PATCH 1/3] KVM: arm64: vgic: Fix IIDR revision field extracted from wrong value David Woodhouse
2026-04-24 11:07   ` (subset) " Marc Zyngier
2026-04-24 12:24     ` David Woodhouse
2026-05-10 21:28       ` David Woodhouse
2026-05-11  7:56         ` Marc Zyngier
2026-05-11  8:13           ` David Woodhouse
2026-04-07 20:27 ` [PATCH 2/3] KVM: arm64: vgic: Allow userspace to set IIDR revision 1 David Woodhouse
2026-04-08  7:54   ` Marc Zyngier
2026-04-08  8:39     ` Woodhouse, David
2026-04-09 13:45       ` Marc Zyngier [this message]
2026-04-09 15:01         ` [EXTERNAL] " David Woodhouse
2026-04-08 10:32     ` David Woodhouse
2026-04-07 20:27 ` [PATCH 3/3] KVM: arm64: selftests: Add vgic IIDR revision test David Woodhouse

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=86v7e02qoq.wl-maz@kernel.org \
    --to=maz@kernel$(echo .)org \
    --cc=arnd@arndb$(echo .)de \
    --cc=catalin.marinas@arm$(echo .)com \
    --cc=dwmw@amazon$(echo .)co.uk \
    --cc=eric.auger@redhat$(echo .)com \
    --cc=joey.gouly@arm$(echo .)com \
    --cc=kees@kernel$(echo .)org \
    --cc=kvm@vger$(echo .)kernel.org \
    --cc=kvmarm@lists$(echo .)linux.dev \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-kselftest@vger$(echo .)kernel.org \
    --cc=nathan@kernel$(echo .)org \
    --cc=oupton@kernel$(echo .)org \
    --cc=pbonzini@redhat$(echo .)com \
    --cc=rananta@google$(echo .)com \
    --cc=shuah@kernel$(echo .)org \
    --cc=suzuki.poulose@arm$(echo .)com \
    --cc=will@kernel$(echo .)org \
    --cc=yuzenghui@huawei$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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