From: Marc Zyngier <maz@kernel.org>
To: Oliver Upton <oupton@google.com>
Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org,
kvmarm@lists.cs.columbia.edu, kernel-team@android.com,
Andre Przywara <andre.przywara@arm.com>
Subject: Re: [PATCH 4/4] KVM: arm64: vgic-v3: Advertise GICR_CTLR.{IR, CES} as a new GICD_IIDR revision
Date: Wed, 16 Mar 2022 15:01:00 +0000 [thread overview]
Message-ID: <875yoeymab.wl-maz@kernel.org> (raw)
In-Reply-To: <YjEdhVFKTkS4GiIS@google.com>
Hi Oliver,
On Tue, 15 Mar 2022 23:13:09 +0000,
Oliver Upton <oupton@google.com> wrote:
>
> Hi Marc,
>
> On Mon, Mar 14, 2022 at 04:40:44PM +0000, Marc Zyngier wrote:
> > @@ -87,8 +91,16 @@ static int vgic_mmio_uaccess_write_v2_misc(struct kvm_vcpu *vcpu,
> > * migration from old kernels to new kernels with legacy
> > * userspace.
> > */
> > - vcpu->kvm->arch.vgic.v2_groups_user_writable = true;
> > - return 0;
> > + reg = FIELD_GET(GICD_IIDR_REVISION_MASK, reg);
> > + switch (reg) {
> > + case KVM_VGIC_IMP_REV_2:
> > + case KVM_VGIC_IMP_REV_3:
> > + dist->v2_groups_user_writable = true;
>
> Could you eliminate this bool and just pivot off of the implementation
> version?
[coming back to this]
Now I remember why this doesn't work. The established behaviour is
that it takes a write to IIDR to switch to the 'writable groups'
mode. If we base the switch on the implementation version, we don't
need a write anymore (we always allow groups to be writable), and old
guests cannot be reliably restored.
32f8777ed92d has the gory details, and that's really not old enough
that we can turn a blind eye to it, unfortunately.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-03-16 15:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 16:40 [PATCH 0/4] KVM: arm64: vgic-v3: MMIO-based LPI invalidation and co Marc Zyngier
2022-03-14 16:40 ` [PATCH 1/4] irqchip/gic-v3: Exposes bit values for GICR_CTLR.{IR, CES} Marc Zyngier
2022-03-15 23:16 ` Oliver Upton
2022-03-16 9:29 ` Marc Zyngier
2022-03-14 16:40 ` [PATCH 2/4] KVM: arm64: vgic-v3: Implement MMIO-based LPI invalidation Marc Zyngier
2022-03-16 5:26 ` Oliver Upton
2022-03-16 9:31 ` Marc Zyngier
2022-03-14 16:40 ` [PATCH 3/4] KVM: arm64: vgic-v3: Expose GICR_CTLR.RWP when disabling LPIs Marc Zyngier
2022-03-16 5:39 ` Oliver Upton
2022-03-14 16:40 ` [PATCH 4/4] KVM: arm64: vgic-v3: Advertise GICR_CTLR.{IR, CES} as a new GICD_IIDR revision Marc Zyngier
2022-03-15 23:13 ` Oliver Upton
2022-03-16 9:27 ` Marc Zyngier
2022-03-16 15:01 ` Marc Zyngier [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=875yoeymab.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=andre.przywara@arm.com \
--cc=kernel-team@android.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=oupton@google.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;
as well as URLs for NNTP newsgroup(s).