From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj8e9-0005Ac-Cx for qemu-devel@nongnu.org; Thu, 13 Dec 2012 08:16:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tj8e7-00012N-Uh for qemu-devel@nongnu.org; Thu, 13 Dec 2012 08:16:17 -0500 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:41271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj8e7-000127-Cg for qemu-devel@nongnu.org; Thu, 13 Dec 2012 08:16:15 -0500 Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 13 Dec 2012 23:11:10 +1000 Date: Fri, 14 Dec 2012 00:17:05 +1100 From: David Gibson Message-ID: <20121213131705.GX5217@truffula.fritz.box> References: <1354588937-27122-1-git-send-email-david@gibson.dropbear.id.au> <1354588937-27122-14-git-send-email-david@gibson.dropbear.id.au> <20121204031145.GG4293@truffula.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 13/13] target-ppc: Give a meaningful error if too many threads are specified List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Mike Qiu , qemu-ppc@nongnu.org, qemu-devel@nongnu.org On Thu, Dec 13, 2012 at 01:57:16PM +0100, Alexander Graf wrote: > > On 04.12.2012, at 04:11, David Gibson wrote: > > > On Tue, Dec 04, 2012 at 01:42:17PM +1100, David Gibson wrote: > >> From: Mike Qiu > > > > Oops, messed this one up, build error for user only builds. Fixed > > version below. > > > > From d2cc6bcee4737647c4bbbf65d3c0129d4a119dd3 Mon Sep 17 00:00:00 2001 > > From: Mike Qiu > > Date: Tue, 4 Dec 2012 10:52:14 +1100 > > Subject: [PATCH] target-ppc: Give a meaningful error if too many threads are > > specified > > > > Currently the target-ppc tcg code only supports a single thread. You can > > specify more, but they're treated identically to multiple cores. On KVM > > we obviously can't support more threads than the hardware; if more are > > specified it will cause strange and cryptic errors. > > > > This patch clarifies the situation by giving a simple meaningful error if > > more threads are specified than we can support. > > > > Signed-off-by: Mike Qiu > > Signed-off-by: David Gibson > > --- > > target-ppc/translate_init.c | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c > > index dba572f..bb054a7 100644 > > --- a/target-ppc/translate_init.c > > +++ b/target-ppc/translate_init.c > > @@ -28,6 +28,7 @@ > > #include > > #include "kvm_ppc.h" > > #include "arch_init.h" > > +#include "cpus.h" > > > > //#define PPC_DUMP_CPU > > //#define PPC_DEBUG_SPR > > @@ -10037,6 +10038,10 @@ static int ppc_fixup_cpu(CPUPPCState *env) > > > > int cpu_ppc_register_internal (CPUPPCState *env, const ppc_def_t *def) > > { > > +#if !defined(CONFIG_USER_ONLY) > > + int max_smt = kvmppc_smt_threads(); > > What if I am using TCG on PPC? Then the stub version of kvmppc_smt_threads() returns 1, and since the PPC TCG doesn't do any SMT emulation, that would seem to be correct... -- 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