Re: [PATCH v2 1/4] KVM: arm64: Allow userspace to change MIDR_EL1

From: Marc Zyngier
Date: Sun Feb 16 2025 - 14:07:14 EST


On Sun, 16 Feb 2025 18:55:23 +0000,
"罗勇刚(Yonggang Luo)" <luoyonggang@xxxxxxxxx> wrote:
>
> On Mon, Feb 17, 2025 at 2:09 AM Marc Zyngier <maz@xxxxxxxxxx> wrote:
> >
> > On Sat, 15 Feb 2025 19:04:20 +0000,
> > "罗勇刚(Yonggang Luo)" <luoyonggang@xxxxxxxxx> wrote:
> > >
> > > According to this, the MIDR EL1 is updated properly, but the MIDR for
> > > aarch32 is not updated, and I don't know how to hook the update for
> > > MIDR for aarch32
> >
> > It is the same thing. The AArch32 view is configured the same way as
> > the AArch64 view, and there is nothing to do at all (that's what
> > VPIDR_EL2 is all about).
> >
> > With Oliver's change, I'm correctly getting a different MIDR using a
> > hacked up kvmtool, see below. I suspect you're not running with the
> > correct patch applied.
> >
> The applied patch is V2, with writing vpidr_el2 disabled, Is that the cause?
> The branch is here
> https://github.com/lygstate/linux/tree/main
> I am not applying your patch

Well, there is no magic. If you don't write to VPIDR_EL2, not much
will happen. You need to apply Oliver's change instead of the first
patch in this series.

M.

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