Received: from eggs.gnu.org ([2001:4830:134:3::10]:40206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKhg1-0006uP-5E for qemu-devel@nongnu.org; Tue, 04 Mar 2014 00:14:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKhfs-0004hQ-6s for qemu-devel@nongnu.org; Tue, 04 Mar 2014 00:14:01 -0500 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:48274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKhfr-0004ZL-8L for qemu-devel@nongnu.org; Tue, 04 Mar 2014 00:13:51 -0500 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 4 Mar 2014 10:43:46 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id D8F8B125803E for ; Tue, 4 Mar 2014 10:45:53 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s245DfRN66846920 for ; Tue, 4 Mar 2014 10:43:41 +0530 Received: from d28av03.in.ibm.com (localhost [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s245DisP009151 for ; Tue, 4 Mar 2014 10:43:44 +0530 From: Stewart Smith In-Reply-To: <1393909374-25728-1-git-send-email-bharata@linux.vnet.ibm.com> References: <1393909374-25728-1-git-send-email-bharata@linux.vnet.ibm.com> Date: Tue, 04 Mar 2014 16:13:43 +1100 Message-ID: <87lhwqlf5k.fsf@river.au.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [RFC PATCH v0] ppc: Force CPU threads count to be a power of 2. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao , qemu-devel@nongnu.org Cc: aik@ozlabs.ru, agraf@suse.de Bharata B Rao writes: > @@ -7987,6 +7989,12 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error **errp) > max_smt, kvm_enabled() ? "KVM" : "TCG"); > return; > } > + threads_shift = log2(smp_threads); > + if (smp_threads != (1 << threads_shift)) { > + error_setg(errp, "Cannot support %d threads on PPC with %s", > + smp_threads, kvm_enabled() ? "KVM" : "TCG"); > + return; > + } > #endif > > if (kvm_enabled()) { I'd suggest adding "(must be power of 2)" to the error message somewhere. with that, Acked-by: Stewart Smith