All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: Thomas Huth <thuth@redhat.com>, Greg Kurz <groug@kaod.org>
Cc: "Murilo Opsfelder Araujo" <muriloo@linux.ibm.com>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	"Cédric Le Goater" <clg@kaod.org>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	mopsfelder@gmail.com, "Daniel P . Berrangé" <berrange@redhat.com>,
	"Fabiano Rosas" <farosas@linux.ibm.com>
Subject: Re: [PATCH] target/ppc/cpu-models: Update max alias to power10
Date: Wed, 1 Jun 2022 06:59:38 -0300	[thread overview]
Message-ID: <28d5e774-c097-99ee-356c-2aa59602f181@gmail.com> (raw)
In-Reply-To: <5076ea8a-428d-5aa2-1a8c-cd38bf67c7f9@redhat.com>



On 6/1/22 06:25, Thomas Huth wrote:
> On 01/06/2022 10.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.
> ...
>> 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.
>>
>> Unless there's a very important use case I'm missing,
>> I'd rather kill the thing instead of trying to resurrect
>> it.
> 
> It's about making ppc similar to other architectures, which
> have "-cpu max" as well, see:
> 
>   https://gitlab.com/qemu-project/qemu/-/issues/1038
> 
> It would be nice to get something similar on ppc.


I agree that it's preferable to fix it.

This is how I would implement -cpu max today:

pseries (default ppc64 machine):
  - kvm: equal to -cpu host
  - tcg: the latest IBM chip available (POWER10 today)

powernv8: POWER8E
powernv9: POWER9
powernv10: POWER10

pseries requires more work because the -cpu max varies with the host CPU
when running with KVM.

About the implementation, for the bug fix it's fine to just hardcode the alias
for each machine-CPU pair. In the long run I would add more code to make -cpu max
always point to the current default CPU of the chosen machine by default, with
each machine overwriting it if needed. This would prevent this alias to be
deprecated over time because we forgot to change it after adding new CPUs.

For qemu-system-ppc the default machine seems to be g3beige and its default
CPU is PowerPC 750. I would set -cpu max to this CPU in this case. Matter of
fact I would attempt to set -cpu max = default cpu for all 32 bits CPUs for
simplicity. This is also outside of gitlab 1038 as well since the bug isn't
mentioning 32 bit machines, hence can be done later.


Thanks,

Daniel


> 
> By the way, the warnings that you currently get when running with
> TCG are quite ugly, too:
> 
> $ ./qemu-system-ppc64
> qemu-system-ppc64: warning: TCG doesn't support requested feature, cap-cfpc=workaround
> qemu-system-ppc64: warning: TCG doesn't support requested feature, cap-sbbc=workaround
> qemu-system-ppc64: warning: TCG doesn't support requested feature, cap-ibs=workaround
> qemu-system-ppc64: warning: TCG doesn't support requested feature, cap-ccf-assist=on
> 
> Maybe these could get fixed with a proper "max" CPU in TCG
> mode, too?
> 
>   Thomas
> 



  reply	other threads:[~2022-06-01 10:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 17:27 [PATCH] target/ppc/cpu-models: Update max alias to power10 Murilo Opsfelder Araujo
2022-05-31 17:52 ` Cédric Le Goater
2022-05-31 18:04 ` Matheus K. Ferst
2022-06-02 12:23   ` Murilo Opsfelder Araújo
2022-06-01  7:27 ` Thomas Huth
2022-06-01  7:44   ` Cédric Le Goater
2022-06-02 12:01     ` Murilo Opsfelder Araújo
2022-06-01  8:38   ` Greg Kurz
2022-06-01  9:25     ` Thomas Huth
2022-06-01  9:59       ` Daniel Henrique Barboza [this message]
2022-06-02 12:18         ` Murilo Opsfelder Araújo
2022-06-01 10:03       ` Greg Kurz
2022-06-01 10:35         ` Daniel Henrique Barboza
2022-06-06 10:59         ` Daniel P. Berrangé
2022-06-02 12:10     ` Murilo Opsfelder Araújo
2022-06-02 13:23       ` Greg Kurz
2022-06-02 11:49   ` Murilo Opsfelder Araújo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28d5e774-c097-99ee-356c-2aa59602f181@gmail.com \
    --to=danielhb413@gmail.com \
    --cc=berrange@redhat.com \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=farosas@linux.ibm.com \
    --cc=groug@kaod.org \
    --cc=mopsfelder@gmail.com \
    --cc=muriloo@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.