From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv426-00063R-4a for qemu-devel@nongnu.org; Fri, 14 Oct 2016 11:04:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bv422-0006OX-1Z for qemu-devel@nongnu.org; Fri, 14 Oct 2016 11:04:25 -0400 Received: from 5.mo179.mail-out.ovh.net ([46.105.43.140]:56563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv421-0006Ny-SC for qemu-devel@nongnu.org; Fri, 14 Oct 2016 11:04:21 -0400 Received: from player792.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo179.mail-out.ovh.net (Postfix) with ESMTP id D6F6DFFA264 for ; Fri, 14 Oct 2016 17:04:19 +0200 (CEST) Date: Fri, 14 Oct 2016 17:04:08 +0200 From: Greg Kurz Message-ID: <20161014170408.4e64f372@bahia> In-Reply-To: References: <1476375902-11715-1-git-send-email-lvivier@redhat.com> <1476375902-11715-2-git-send-email-lvivier@redhat.com> <20161014095616.661fdf1c@bahia> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 01/20] exec: split cpu_exec_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: qemu-devel@nongnu.org, Matthew Rosato , Peter Maydell , Eduardo Habkost , Markus Armbruster , Bharata B Rao , Paolo Bonzini , David Gibson On Fri, 14 Oct 2016 14:13:12 +0200 Laurent Vivier wrote: > On 14/10/2016 09:56, Greg Kurz wrote: > > On Thu, 13 Oct 2016 18:24:43 +0200 > > Laurent Vivier wrote: > > > >> Extract the realize part to cpu_exec_realize(), update all > >> calls to cpu_exec_init() to add cpu_exec_realize() to > >> have no functionnal change. > >> > >> Put in cpu_exec_init() what initializes the CPU, > >> in cpu_exec_realize() what adds it to the environment. > >> > >> Remove error parameter from cpu_exec_init() as it can't fail. > >> > >> Rename cpu_exec_exit() with cpu_exec_unrealize(): > >> cpu_exec_exit() is undoing what it has been done by cpu_exec_realize(), so > >> call it cpu_exec_unrealize(). > >> > >> CC: Paolo Bonzini > >> Signed-off-by: Laurent Vivier > >> --- > > > > Just one question: is there a reason that prevents cpu_exec_unrealize() to be > > declared in include/exec/exec-all.h next to cpu_exec_realize() ? > > because qom/cpu.c doesn't include exec-all.h (and we can't as exec-all.h > is target specific and qom/cpu.c is common code). > That's a good reason indeed, even if cpu_exec_realize() and cpu_exec_unrealize() could theorically be compiled only twice: once for system, once for user. > Laurent Thanks ! -- Greg