From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQ6W9-0002rv-Up for qemu-devel@nongnu.org; Tue, 18 Mar 2014 22:46:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQ6W2-0001vB-CV for qemu-devel@nongnu.org; Tue, 18 Mar 2014 22:46:09 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:33537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQ6W1-0001u3-GV for qemu-devel@nongnu.org; Tue, 18 Mar 2014 22:46:02 -0400 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 19 Mar 2014 12:45:57 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 696F82CE8055 for ; Wed, 19 Mar 2014 13:45:54 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s2J2jdQ57012746 for ; Wed, 19 Mar 2014 13:45:40 +1100 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s2J2jqah017314 for ; Wed, 19 Mar 2014 13:45:52 +1100 Date: Wed, 19 Mar 2014 08:17:52 +0530 From: Bharata B Rao Message-ID: <20140319024752.GB11069@in.ibm.com> References: <1394008356-15320-1-git-send-email-bharata@linux.vnet.ibm.com> <53172DC1.9070505@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53172DC1.9070505@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] ppc: Force CPU threads count to be a power of 2. Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: aik@ozlabs.ru, stewart@linux.vnet.ibm.com, qemu-devel@nongnu.org, Andreas =?iso-8859-1?Q?F=E4rber?= , agraf@suse.de On Wed, Mar 05, 2014 at 06:59:29AM -0700, Eric Blake wrote: > On 03/05/2014 01:32 AM, Bharata B Rao wrote: > > PowerPC kernel expects the number of SMT threads in a core to be a power > > of 2. Since QEMU doesn't enforce this, it leads to an early guest kernel > > crash if invalid threads count is specified. > > > > Prevent this crash and make it a graceful exit from QEMU itself by > > validating the user supplied threads count. > > > > Signed-off-by: Bharata B Rao > > --- > > Changes in v2: Use is_power_of_2() from QEMU itself instead of depending > > on libm. > > v1: https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg00660.html > > v0: https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg00355.html > > Reviewed-by: Eric Blake > Reviewed-by: Stewart Smith Alexander/Andreas, Could you take this patch into your tree ? Regards, Bharata.