[PATCH RFC] KVM: arm64: allow ID_MMFR4_EL1 to be writable

Oliver Upton oliver.upton at linux.dev
Wed May 1 10:57:20 PDT 2024


Hi Russell,

On Wed, May 01, 2024 at 06:06:51PM +0100, Russell King (Oracle) wrote:
> Between 5.4 and 5.15, the guests view of HPDS, CnP, XNX and AC2
> changed their value on the same Neoverse N1 r3p1 hardware which makes
> migrating between these kernels on the host problematical.

It'd be helpful to expand a bit more on how these fields changed, better
yet if we can blame it back to a commit. I'm guessing the only direction
of migration you care about is old -> new then?

> We already permit changing HPDS in AA64MMFR1_EL1 and CnP in
> AA64MMFR2_EL1. We also allow LSM as we allow that in AA64MMFR2_EL1,
> so this patch includes support for that even though it isn't required.
> 
> Discussing with Marc Zygnier, AC2 should also be fine to be writable,

typo: Zyngier

> even though we don't inject an UNDEF if the guest accesses those
> registers.
> 
> The only questionable one is XNX, execute-never control distinction,
> which is also in AA64MMFR1_EL1 but we don't allow to be changed there.

It is quite odd for us to expose this field to non-nested VMs in the
first place, though I suppose we will apply an additional set of
restrictions for nested VMs when they come along.

-- 
Thanks,
Oliver



More information about the linux-arm-kernel mailing list