From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv2bv-0001Gq-Ap for qemu-devel@nongnu.org; Fri, 14 Oct 2016 09:33:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bv2br-0006b3-Gc for qemu-devel@nongnu.org; Fri, 14 Oct 2016 09:33:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv2br-0006as-AO for qemu-devel@nongnu.org; Fri, 14 Oct 2016 09:33:15 -0400 Date: Fri, 14 Oct 2016 10:33:10 -0300 From: Eduardo Habkost Message-ID: <20161014133310.GF3275@thinpad.lan.raisama.net> References: <1476375902-11715-1-git-send-email-lvivier@redhat.com> <1476375902-11715-3-git-send-email-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1476375902-11715-3-git-send-email-lvivier@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 02/20] target-i386: move back cpu_exec_init() to init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: qemu-devel@nongnu.org, David Gibson , Paolo Bonzini , Peter Maydell , Bharata B Rao , Markus Armbruster , Matthew Rosato On Thu, Oct 13, 2016 at 06:24:44PM +0200, Laurent Vivier wrote: > We have now the cpu_exec_realize() in realize, > so the init part must be in init. > > I've removed the cannot_destroy_with_object_finalize_yet field as > unsafe references have been moved to cpu_exec_realize(). > (tested with QOM command provided by commit 4c315c27 with > "athlon-x86_64-cpu") > > CC: Eduardo Habkost > Signed-off-by: Laurent Vivier Resending the question I asked in my reply to v1: Instead of creating requiring each subclass to manually call cpu_exec_init()) on instance_init, why don't we move parts of cpu_exec_init()/cpu_exec_realize() code to cpu_common_initfn()? (TYPE_CPU's instance_init) (And if there's any code that needs to be run after the subclasses instance_init functions, we can just add a instance_post_init function to TYPE_CPU). -- Eduardo