[RFC PATCH 0/6] KVM: arm64: Errata management for VM Live migration

Oliver Upton oliver.upton at linux.dev
Fri Oct 18 11:52:37 PDT 2024


On Fri, Oct 18, 2024 at 02:17:17PM +0100, Marc Zyngier wrote:
> On Thu, 17 Oct 2024 18:16:04 +0100,
> Eric Auger <eric.auger at redhat.com> wrote:
> > 
> > Hi Shameer,
> > 
> > On 10/17/24 17:49, Cornelia Huck wrote:
> 
> > > Speaking of QEMU: Do you maybe already have some prototype code that
> > > tries to do something with the setup here? (I don't think QEMU currently
> > > mucks around with MIDR and friends when running with KVM; I wonder what
> > > it should provide to the guest and if it should care to set something as
> > > a base level that gives guests not using the hypercall a chance to work
> > > properly.)
> > >
> > As discussed during the KVM forum we are working on a qemu integration
> > for writable ID regs. The first goal is to be able to specialize the
> > host passthrough model (custom host model). Maybe this will trigger more
> > discussions on named models too. This is complementary to the
> > MIDR/REVIDR problematic and I hope we will be able to consolidate our
> > works at some point.
> 
> Complementary to the MIDR/REVIDR work, I would also like to make
> MIDR/REVIDR writable when this scheme is available. Ideally reporting
> a synthetic CPU description (with MIDR_EL1.Implementer returning 0,
> and the rest being VMM-specific, but with a clear definition for the
> IMPDEF fields so that we can version the ABI).

When the VMM is using the hypercall mechanism to describe
implementations, 100% agree.

> Thoughts?

I think we should go a step further and allow userspace full control of
known fields in these registers, even for a nonzero Implementer code.

We're already affording userspace full control of what implementation(s)
the guest sees anyway via hypercalls, so there isn't much left for KVM
to enforce.

Ignoring errata, it'd let folks spoof an old implementation on newer
hardware for testing, especially when dealing w/ older software.

-- 
Thanks,
Oliver



More information about the linux-arm-kernel mailing list