qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] target/ppc/cpu-models: Update max alias to power10


From: Greg Kurz
Subject: Re: [PATCH] target/ppc/cpu-models: Update max alias to power10
Date: Thu, 2 Jun 2022 15:23:18 +0200

On Thu, 2 Jun 2022 09:10:57 -0300
Murilo Opsfelder Araújo <muriloo@linux.ibm.com> wrote:

> Hi, Greg.
> 
> On 6/1/22 05:38, Greg Kurz wrote:
> > On Wed, 1 Jun 2022 09:27:31 +0200
> > Thomas Huth <thuth@redhat.com> wrote:
> >
> >> On 31/05/2022 19.27, Murilo Opsfelder Araujo wrote:
> >>> Update max alias to power10 so users can take advantage of a more
> >>> recent CPU model when '-cpu max' is provided.
> >>>
> >>> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1038
> >>> Cc: Daniel P. Berrangé <berrange@redhat.com>
> >>> Cc: Thomas Huth <thuth@redhat.com>
> >>> Cc: Cédric Le Goater <clg@kaod.org>
> >>> Cc: Daniel Henrique Barboza <danielhb413@gmail.com>
> >>> Cc: Fabiano Rosas <farosas@linux.ibm.com>
> >>> Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
> >>> ---
> >>>    target/ppc/cpu-models.c | 3 ++-
> >>>    1 file changed, 2 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c
> >>> index 976be5e0d1..c15fcb43a1 100644
> >>> --- a/target/ppc/cpu-models.c
> >>> +++ b/target/ppc/cpu-models.c
> >>> @@ -879,7 +879,6 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
> >>>        { "755", "755_v2.8" },
> >>>        { "goldfinger", "755_v2.8" },
> >>>        { "7400", "7400_v2.9" },
> >>> -    { "max", "7400_v2.9" },
> >>>        { "g4",  "7400_v2.9" },
> >>>        { "7410", "7410_v1.4" },
> >>>        { "nitro", "7410_v1.4" },
> >>> @@ -910,6 +909,8 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
> >>>        { "power8nvl", "power8nvl_v1.0" },
> >>>        { "power9", "power9_v2.0" },
> >>>        { "power10", "power10_v2.0" },
> >>> +    /* Update the 'max' alias to the latest CPU model */
> >>> +    { "max", "power10_v2.0" },
> >>>    #endif
> >>
> >> I'm not sure whether "max" should really be fixed alias in this list here?
> >> What if a user runs with KVM on a POWER8 host - then "max" won't work this
> >> way, will it?
> >>
> >> And in the long run, it would also be good if this would work with other
> >> machines like the "g3beige", too (which don't support the new 64-bit POWER
> >> CPUs), so you should at least mention in the commit description that this 
> >> is
> >> only a temporary hack for the pseries machine, I think.
> >>
> >
> > I didn't even know there was a "max" alias :-)
> 
> Me too.  :)
> 
> > This was introduced by commit:
> >
> > commit 3fc6c082e3aad85addf25d36740030982963c0c8
> > Author: Fabrice Bellard <fabrice@bellard.org>
> > Date:   Sat Jul 2 20:59:34 2005 +0000
> >
> >      preliminary patch to support more PowerPC CPUs (Jocelyn Mayer)
> >
> > This was already a 7400 model at the time. Obviously we've never
> > maintained that and I hardly see how it is useful... As Thomas
> > noted, "max" has implicit semantics that depend on the host.
> > This isn't migration friendly and I'm pretty sure libvirt
> > doesn't use it (Daniel ?)
> >
> > We already have the concept of default CPU for the spapr
> > machine types, that is usually popped up to the newer
> > CPU model that is going to be supported in production.
> > This goes with a bump of the machine type version as
> > well for the sake of migration. This seems a lot more
> > reliable than the "max" thingy IMHO.
> 
> We can use the default CPU type of the sPAPR machine as the "-cpu
> max".  That would be a safer choice, I think.
> 

Hi Murilo !

After reading the various comments, I agree that the default CPU
type of the machine type [*] with TCG, and the host CPU type with
KVM is the most sensible choice.

[*] taking into account the machine type passed by the user, e.g.
    we want power8_v2.0 when running a pseries-3.1, not power9_v2.0.

Cheers,

--
Greg

> Cheers!
> 
> --
> Murilo
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]