All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] hw/ppc/spapr: Use POWER8 by default for the pseries-2.8 machine
Date: Wed, 5 Oct 2016 09:36:29 +0200	[thread overview]
Message-ID: <a06b7613-5c46-dc1c-d51e-1be9b5fa92da@redhat.com> (raw)
In-Reply-To: <20161005000752.GF18648@umbus.fritz.box>

[-- Attachment #1: Type: text/plain, Size: 1914 bytes --]

On 05.10.2016 02:07, David Gibson wrote:
> On Tue, Oct 04, 2016 at 02:55:44PM +0200, Thomas Huth wrote:
>> A couple of distributors are compiling their distributions
>> with "-mcpu=power8" for ppc64le these days, so the user sooner
>> or later runs into a crash there when not explicitely specifying
>> the "-cpu POWER8" option to QEMU. Due to this reason, the linux-user
>> target already switched to POWER8 by default a while ago (see commit
>> de3f1b98410e0d5b406a0df3a48547b559d18602). Since the softmmu target
>> of course has the same problem, we should switch there to POWER8
>> by default for the newer machine types, too.
>>
>> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1357808
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
> 
> Sounds good, one detail..
> 
>> ---
>>  Note: This patch should be applied on top of David's ppc-for-2.8
>>  tree, since the pseries-2.8 machine has just been added there
>>  recently.
>>
>>  hw/ppc/spapr.c         | 11 ++++++++++-
>>  include/hw/ppc/spapr.h |  1 +
>>  2 files changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
>> index 63b6a0d..799bcff 100644
>> --- a/hw/ppc/spapr.c
>> +++ b/hw/ppc/spapr.c
>> @@ -1775,7 +1775,13 @@ static void ppc_spapr_init(MachineState *machine)
>>  
>>      /* init CPUs */
>>      if (machine->cpu_model == NULL) {
>> -        machine->cpu_model = kvm_enabled() ? "host" : "POWER7";
>> +        if (kvm_enabled()) {
>> +            machine->cpu_model = "host";
>> +        } else if (smc->tcg_default_cpu) {
>> +            machine->cpu_model = smc->tcg_default_cpu;
>> +        } else {
>> +            machine->cpu_model = "POWER8";
>> +        }
> 
> You can avoid the last if branch if you initialize tcg_default_cpu to
> POWER8 in spapr_machine_class_init().

You're right, that sounds better. I'll send a v2 ...

 Thomas



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2016-10-05  7:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04 12:55 [Qemu-devel] [PATCH] hw/ppc/spapr: Use POWER8 by default for the pseries-2.8 machine Thomas Huth
2016-10-05  0:07 ` David Gibson
2016-10-05  7:36   ` Thomas Huth [this message]

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=a06b7613-5c46-dc1c-d51e-1be9b5fa92da@redhat.com \
    --to=thuth@redhat.com \
    --cc=agraf@suse.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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.