[PATCH v8 09/69] KVM: arm64: nv: Reset VMPIDR_EL2 and VPIDR_EL2 to sane values

Marc Zyngier maz at kernel.org
Tue Jan 31 14:16:35 PST 2023


On Tue, 31 Jan 2023 22:09:53 +0000,
Oliver Upton <oliver.upton at linux.dev> wrote:
> 
> On Tue, Jan 31, 2023 at 10:04:40PM +0000, Marc Zyngier wrote:
> > On Tue, 31 Jan 2023 20:17:50 +0000, Oliver Upton <oliver.upton at linux.dev> wrote:
> > > 
> > > On Tue, Jan 31, 2023 at 09:24:04AM +0000, Marc Zyngier wrote:
> > > > From: Christoffer Dall <christoffer.dall at arm.com>
> > > > 
> > > > The VMPIDR_EL2 and VPIDR_EL2 are architecturally UNKNOWN at reset, but
> > > > let's be nice to a guest hypervisor behaving foolishly and reset these
> > > > to something reasonable anyway.
> > > 
> > > Must we be so kind? :)
> > > 
> > > In all seriousness, I've found the hexspeak value of reset_unknown() to
> > > be a rather useful debugging aid. And I can promise you that I'll use NV
> > > to debug my own crap changes!
> > > 
> > > Any particular reason against just using reset_unknown()?
> > 
> > Because debugging NV itself is hell when all you have is a model!
> 
> Blech!
> 
> > As we were trying to debug the early code base, we really wanted to
> > make it easy to run tiny guests without much setup, and work out of
> > the box. That's how this sort of changes came about.
> > 
> > In any case, something like this the hack below works as well (I just
> > booted an L1 and a couple of L2s with it, and nothing caught fire).
> 
> LGTM, mind squashing it into the previous patch?

Sure thing.

	M.

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



More information about the linux-arm-kernel mailing list