All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Greg Kurz <groug@kaod.org>
Cc: "Laurent Vivier" <lvivier@redhat.com>,
	joserz@linux.vnet.ibm.com, qemu-devel@nongnu.org,
	"Thomas Huth" <thuth@redhat.com>,
	qemu-ppc@nongnu.org, "Suraj Singh" <sursingh@redhat.com>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Sam Bobroff" <sbobroff@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 2/2] target/ppc: move POWER9 DD1 workaround to init_proc_POWER9()
Date: Wed, 5 Jul 2017 16:36:41 +1000	[thread overview]
Message-ID: <20170705063641.GK2180@umbus.fritz.box> (raw)
In-Reply-To: <20170704150239.2e4adb64@bahia.lan>

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

On Tue, Jul 04, 2017 at 03:02:39PM +0200, Greg Kurz wrote:
> On Tue, 4 Jul 2017 21:41:51 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> > On Tue, Jul 04, 2017 at 01:15:00PM +0200, Greg Kurz wrote:
> > > On Tue,  4 Jul 2017 13:01:26 +0200
> > > Laurent Vivier <lvivier@redhat.com> wrote:
> > >   
> > > > Commit 5f3066d ("target/ppc: Allow workarounds for POWER9 DD1")
> > > > disables compatibility mode for POWER9 DD1 to allow to
> > > > boot on POWER9 DD1 host with KVM.
> > > > 
> > > > As the workaround has been added in kvmppc_host_cpu_class_init(),
> > > > it applies only on CPU created with "-cpu host".
> > > > As we want to be able to use also "-cpu POWER9" on a POWER9 DD1
> > > > host, this patch moves the workaround from kvmppc_host_cpu_class_init()
> > > > to init_proc_POWER9().
> > > >   
> > > 
> > > As with ppc_cpu_initfn() in your previous version, init_proc_POWER9() is
> > > called for every CPU instance.. ie, all CPU will adjust the @pcr_supported
> > > class attribute...  
> > 
> > Ah.. yeah.. I didn't notice that before.  That's definitely not right.
> > 
> > > What about moving the workaround to ppc_POWER9_cpu_family_class_init()
> > > instead ? This would just require to expose mfpvr() in some header.  
> > 
> > Yeah, as someone else pointed out using the host PVR is also
> > definitely not right (unless you're in a function specifically
> > connected to the host cpu class).
> > 
> 
> I agree but the root issue is that we accept to pass -cpu POWER9 instead of
> -cpu host with -enable-kvm. And the host cpu class isn't involved in this
> case.

Well.. it sort of is.  I believe the way we make this work (since
Thomas' cleanup) is that when KVM is active, we alter the alias for
the host cpu's family to point to the host cpu class, instead of
whatever specific version it usually points to.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2017-07-05  7:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-04 11:01 [Qemu-devel] [PATCH v4 0/2] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1 Laurent Vivier
2017-07-04 11:01 ` [Qemu-devel] [PATCH v4 1/2] " Laurent Vivier
2017-07-04 11:01 ` [Qemu-devel] [PATCH v4 2/2] target/ppc: move POWER9 DD1 workaround to init_proc_POWER9() Laurent Vivier
2017-07-04 11:12   ` Thomas Huth
2017-07-04 11:15   ` Greg Kurz
2017-07-04 11:21     ` Laurent Vivier
2017-07-04 11:28       ` Laurent Vivier
2017-07-04 11:41     ` David Gibson
2017-07-04 13:02       ` Greg Kurz
2017-07-04 13:08         ` Thomas Huth
2017-07-05  6:36         ` David Gibson [this message]
2017-07-05  7:56           ` Thomas Huth
2017-07-05  8:47             ` Greg Kurz

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=20170705063641.GK2180@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=clg@kaod.org \
    --cc=groug@kaod.org \
    --cc=joserz@linux.vnet.ibm.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sbobroff@redhat.com \
    --cc=sursingh@redhat.com \
    --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.