From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfkmA-00089E-R4 for qemu-devel@nongnu.org; Fri, 02 Sep 2016 05:28:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfkm2-0004s1-9c for qemu-devel@nongnu.org; Fri, 02 Sep 2016 05:28:42 -0400 Received: from 4.mo179.mail-out.ovh.net ([46.105.36.149]:55096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfkm2-0004rg-3w for qemu-devel@nongnu.org; Fri, 02 Sep 2016 05:28:34 -0400 Received: from player698.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo179.mail-out.ovh.net (Postfix) with ESMTP id 8044CFFCBC2 for ; Fri, 2 Sep 2016 11:28:32 +0200 (CEST) Date: Fri, 2 Sep 2016 11:28:09 +0200 From: Greg Kurz Message-ID: <20160902112809.03445602@bahia.lan> In-Reply-To: <1472797976-24210-3-git-send-email-nikunj@linux.vnet.ibm.com> References: <1472797976-24210-1-git-send-email-nikunj@linux.vnet.ibm.com> <1472797976-24210-3-git-send-email-nikunj@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 2/4] target-ppc: with MTTCG report more threads List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikunj A Dadhania Cc: qemu-ppc@nongnu.org, alex.bennee@linaro.org, david@gibson.dropbear.id.au, rth@twiddle.net, qemu-devel@nongnu.org On Fri, 2 Sep 2016 12:02:54 +0530 Nikunj A Dadhania wrote: > Signed-off-by: Nikunj A Dadhania > --- Shouldn't this patch be the last one, when all other issues have been addressed ? > target-ppc/kvm.c | 2 +- > target-ppc/kvm_ppc.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c > index dcb68b9..20eb450 100644 > --- a/target-ppc/kvm.c > +++ b/target-ppc/kvm.c > @@ -2090,7 +2090,7 @@ void kvmppc_set_mpic_proxy(PowerPCCPU *cpu, int mpic_proxy) > > int kvmppc_smt_threads(void) > { > - return cap_ppc_smt ? cap_ppc_smt : 1; > + return cap_ppc_smt ? cap_ppc_smt : 8; If KVM is there but does not support SMT processor modes, it looks wrong to return anything but 1. This check needs kvm_enabled(). Also, why 8 ? This depends on the CPU model. Also, since real HW allows to choose the SMT mode, maybe this should be configurable from the command line as well. > } > > #ifdef TARGET_PPC64 > diff --git a/target-ppc/kvm_ppc.h b/target-ppc/kvm_ppc.h > index 5461d10..053db0a 100644 > --- a/target-ppc/kvm_ppc.h > +++ b/target-ppc/kvm_ppc.h > @@ -128,7 +128,7 @@ static inline void kvmppc_set_mpic_proxy(PowerPCCPU *cpu, int mpic_proxy) > > static inline int kvmppc_smt_threads(void) > { > - return 1; > + return 8; Same remark. > } > > static inline int kvmppc_or_tsr_bits(PowerPCCPU *cpu, uint32_t tsr_bits) Cheers. -- Greg