From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj9bY-0005mr-T8 for qemu-devel@nongnu.org; Thu, 13 Dec 2012 09:17:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tj9bU-0000X8-2v for qemu-devel@nongnu.org; Thu, 13 Dec 2012 09:17:40 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]:33695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj9bT-0000WZ-T9 for qemu-devel@nongnu.org; Thu, 13 Dec 2012 09:17:35 -0500 Received: by mail-pb0-f45.google.com with SMTP id mc8so1529045pbc.4 for ; Thu, 13 Dec 2012 06:17:34 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <076A638B-C071-44B1-B845-C30018FDEBF4@suse.de> 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> <20121213131705.GX5217@truffula.fritz.box> <076A638B-C071-44B1-B845-C30018FDEBF4@suse.de> Date: Thu, 13 Dec 2012 14:17:34 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 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: qemu-ppc@nongnu.org, Mike Qiu , qemu-devel@nongnu.org, David Gibson On 13 December 2012 13:19, Alexander Graf wrote: > > On 13.12.2012, at 14:17, David Gibson wrote: > >> On Thu, Dec 13, 2012 at 01:57:16PM +0100, Alexander Graf wrote: >>> 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... > > int kvmppc_smt_threads(void) > { > return cap_ppc_smt ? cap_ppc_smt : 1; > } > > So because we don't call kvm_arch_init, the cap is 0 and thus we return 1? No, if we aren't CONFIG_KVM then that source file and version of the function aren't compiled at all. David means the stub function, which is in kvm_ppc.h: static inline int kvmppc_smt_threads(void) { return 1; } (if you don't like stubs lurking in the header file you could have a target-ppc/kvm-stub.c by analogy with the i386 one I suppose) -- PMM