From: Marc Zyngier <maz@kernel.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Will Deacon <will@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>, kvm <kvm@vger.kernel.org>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>,
"Kernel Mailing List, Linux" <linux-kernel@vger.kernel.org>,
Sean Christopherson <seanjc@google.com>,
Jim Mattson <jmattson@google.com>,
Oliver Upton <oupton@kernel.org>, Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Raghavendra Rao Ananta <rananta@google.com>,
Eric Auger <eric.auger@redhat.com>, Kees Cook <kees@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Nathan Chancellor <nathan@kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
kvmarm@lists.linux.dev,
linux-kselftest <linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH] Documentation: KVM: Document guest-visible compatibility expectations
Date: Tue, 19 May 2026 13:38:57 +0100 [thread overview]
Message-ID: <86qzn7wp3y.wl-maz@kernel.org> (raw)
In-Reply-To: <CABgObfacAYexR25SMi1kSZMRnHx3EDGj8=E84V1DumER66ibnQ@mail.gmail.com>
On Tue, 19 May 2026 13:13:41 +0100,
Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On Tue, May 19, 2026 at 1:44 PM David Woodhouse <dwmw2@infradead.org> wrote:
> > > > So... what next? Is one of the other KVM/arm64 maintainers going to
> > > > speak up? Paolo would you consider taking the fixes through your tree
> > > > directly?
>
> I admit that my knowledge of Arm is really limited, and I do not
> understand which IIDR values have architecturally allowed behaviors
> and which (if any) were made up by KVM; but even if I cannot honestly
> remark on the code or even the approach, a compatibility knob is the
> right thing to have. That's a userspace API design matter, not an Arm
> or GIC matter.
I agree that we can have the knob -- not having it is a userspace
issue, and I have said that I was OK with preserving the userspace
interface.
>
> I hope that Marc provides a better explanation of why he believes
> https://lore.kernel.org/all/20260511113558.3325004-2-dwmw2@infradead.org/
> shouldn't be accepted, because I am more than a bit puzzled about
> *why* that patch is being rejected or (in v3) so far ignored. Marc in
> this thread wrote: "If userspace is not a total joke, it will read all
> the ID registers, and configure what it wants to see, assuming it is a
> feature that can be configured (not everything can, because the
> architecture itself is not fully backward compatible)".
This was a more general comment on the full mechanism that we use to
save/restore the state and at the same time configure the feature
set. Which is what the GICD_IIDR does to some extent for the GIC.
> But in this case there's an ID register that tells KVM if userspace
> wants the old or the new behavior, independent of whether that old
> behavior is architecturally valid or not.
But the "old behaviour" makes no sense, and cannot be used by a guest:
- either the guest doesn't use the alternative interrupt groups, then
it wasn't affected by the bug. That's 100% of the guests.
- or the guest did try to use the alternative groups, and it *NEVER*
worked, as it wouldn't get any interrupt at all. What is the point
of preserving a "feature" that only results in a non-working guest?
Given that, re-introducing a behaviour that cannot be used makes zero
sense to me.
> I will certainly take this patch, but I won't override Marc. However
> I'd like to better understand his point of view, because right now I
> just don't get it.
I don't get it either, but for different reasons.
>
> > If KVM on arm64 doesn't aspire to maintain guest compatibility across
> > host kernel changes — regardless of whether the previous kernel's
> > behaviour was "blessed" by the architecture specification or not — then
> > it does not meet the expectation that we have of KVM implementations in
> > the Linux kernel.
>
> I agree with the "aspire" wording. Even if it's not going to be 100%
> achievable, KVM *needs* to aspire to maintain both guest compatibility
> and architecture precision. Sometimes it's impossible, sometimes there
> are constraints that require you to trade off one for another (e.g.
> via quirks, or by breaking behavior that no sane guest would have
> cared about). But in general as a maintainer you don't *get* to
> choose.
>
> Paolo
>
> > Or indeed the standards that we've held for Linux kernel ABIs for the
> > last 35 years.
As I said before, I'd be OK with something that would restore IIDR to
REV1. But not something that actively breaks the GIC emulation by
reintroducing a bug. That's, by construction, dead code that will only
bitrot, because there is no SW that can make use of this nonsense.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2026-05-19 12:39 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 8:57 [PATCH] Documentation: KVM: Document guest-visible compatibility expectations David Woodhouse
2026-05-11 15:14 ` Paolo Bonzini
2026-05-11 16:38 ` David Woodhouse
2026-05-11 16:56 ` Paolo Bonzini
2026-05-11 17:53 ` David Woodhouse
2026-05-13 8:42 ` Marc Zyngier
2026-05-13 9:24 ` David Woodhouse
2026-05-13 12:43 ` Paolo Bonzini
2026-05-13 13:03 ` Eric Auger
2026-05-13 13:57 ` David Woodhouse
2026-05-13 16:24 ` Paolo Bonzini
2026-05-13 18:26 ` David Woodhouse
2026-05-19 10:41 ` David Woodhouse
2026-05-19 11:11 ` Will Deacon
2026-05-19 11:44 ` David Woodhouse
2026-05-19 12:13 ` Paolo Bonzini
2026-05-19 12:38 ` Marc Zyngier [this message]
2026-05-19 12:56 ` Marc Zyngier
2026-05-19 13:24 ` David Woodhouse
2026-05-19 12:59 ` David Woodhouse
2026-05-19 13:53 ` Paolo Bonzini
2026-05-19 14:13 ` David Woodhouse
2026-05-19 21:10 ` Oliver Upton
2026-05-19 21:58 ` David Woodhouse
2026-05-19 22:57 ` Oliver Upton
2026-05-19 23:33 ` David Woodhouse
2026-05-19 12:42 ` 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=86qzn7wp3y.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=dwmw2@infradead.org \
--cc=eric.auger@redhat.com \
--cc=jmattson@google.com \
--cc=joey.gouly@arm.com \
--cc=kees@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=oupton@kernel.org \
--cc=pbonzini@redhat.com \
--cc=rananta@google.com \
--cc=seanjc@google.com \
--cc=skhan@linuxfoundation.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