Received: from eggs.gnu.org ([2001:4830:134:3::10]:38233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXV1F-0008GZ-3N for qemu-devel@nongnu.org; Wed, 10 Aug 2016 11:02:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXV1A-0000ex-Ux for qemu-devel@nongnu.org; Wed, 10 Aug 2016 11:02:08 -0400 Date: Wed, 10 Aug 2016 12:01:57 -0300 From: Eduardo Habkost Message-ID: <20160810150157.GA13612@thinpad.lan.raisama.net> References: <146839674009.29126.18254528210644697405.stgit@bahia.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <146839674009.29126.18254528210644697405.stgit@bahia.lan> Subject: Re: [Qemu-devel] [PATCH] ppc: parse cpu features once List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: David Gibson , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Bharata B Rao On Wed, Jul 13, 2016 at 10:07:07AM +0200, Greg Kurz wrote: > Considering that features are converted to global properties and > global properties are automatically applied to every new instance > of created CPU (at object_new() time), there is no point in > parsing cpu_model string every time a CPU created. So move > parsing outside CPU creation loop and do it only once. > > Parsing also should be done before any CPU is created so that > features would affect the first CPU a well. > > This patch does that for all PowerPC machine types. > > It is based on previous work from Bharata: > > https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg07564.html > > Signed-off-by: Greg Kurz Most of the cases below already call cpu_ppc_init(), which calls cpu_generic_init(), which calls cc->parse_features(). This means this patch is not fixing any bug on those cases, but is just as an improvement towards removing parse_features() from cpu_generic_init(). spapr, on the other hand, really needs a bug fix to make it call cc->parse_features() in the path where core objects are created. So, I suggest we split this patch so we can include the spapr bug fix in 2.7, and change the other machines (that use cpu_ppc_init()/cpu_generic_init()) after 2.7. -- Eduardo