[Libguestfs] [PATCH] always 'max' for the appliance CPU model on all targes except ppc

Peter Maydell peter.maydell at linaro.org
Wed May 25 18:12:19 UTC 2022


On Wed, 25 May 2022 at 18:34, Richard W.M. Jones <rjones at redhat.com> wrote:
>
> On Wed, May 25, 2022 at 05:13:53PM +0100, Peter Maydell wrote:
> > On Wed, 25 May 2022 at 16:07, Laszlo Ersek <lersek at redhat.com> wrote:
> > >
> > > + Drew & Peter
> > >
> > > On 05/25/22 15:30, Daniel P. Berrangé wrote:
> > > - The patch seems to do what it says in the commit message.
> > >
> > > - QEMU commit bab52d4bba3f ("target/arm: Add "-cpu max" support",
> > >   2018-03-09) confirms what the commit message says, about both TCG and
> > >   KVM.
> > >
> > > - To smoke-test the TCG-related change, I've edited a long-term TCG
> > >   aarch64 libvirt domain of mine, replacing "cortex-a57" with "max".
> > >   Both edk2 and the Linux guest continued working. So I guess the TCG
> > >   change is OK.
> >
> > One thing to note here is that if you are using:
> >  * TCG -cpu max
> >  * 'virt' with no named version or with 'virt-7.0' or later
> >  * a Linux kernel version prior to v5.12
> > then a bug in Linux means it won't boot. (This is because of
> > the LPA2 CPU feature which TCG -cpu max now emulates; older
> > kernels were buggy and won't boot on an LPA2 CPU, including
> > a real hardware one.)
>
> Is this related at all to the 5-level page tables (la57) failure with
> TCG and -cpu max?
>
> https://gitlab.com/qemu-project/qemu/-/issues/1023

No, it's an Arm-specific bug fixed in kernel commit 26f55386f964cefa92.
(Roughly, the architecture manual says that ID register fields should
be tested with "must be at least N" to look for presence of features,
but in this case the kernel was testing for "is equal to N", which then
breaks if the hardware is implementing a newer-but-compatible feature
that is reported by setting the field equal to N+1.)

-- PMM



More information about the Libguestfs mailing list