Received: from eggs.gnu.org ([2001:4830:134:3::10]:42107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxHJc-0006QT-Ub for qemu-devel@nongnu.org; Thu, 20 Oct 2016 13:39:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxHJc-0000gi-4P for qemu-devel@nongnu.org; Thu, 20 Oct 2016 13:39:40 -0400 Date: Thu, 20 Oct 2016 15:39:26 -0200 From: Eduardo Habkost Message-ID: <20161020173926.GG5057@thinpad.lan.raisama.net> References: <1476962764-12166-1-git-send-email-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1476962764-12166-1-git-send-email-lvivier@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 0/3] Split cpu_exec_init() into an init and a realize part List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: Igor Mammedov , Bharata B Rao , David Gibson , Peter Maydell , Paolo Bonzini , Anthony Green , Alexander Graf , Matthew Rosato , qemu-devel@nongnu.org, Richard Henderson , qemu-arm@nongnu.org, Greg Ungerer , Guan Xuetao , Markus Armbruster , Jia Liu , Artyom Tarasenko , "Edgar E . Iglesias" , Michael Walle , Andrew Jones , Aurelien Jarno , Chen Gang , qemu-ppc@nongnu.org, Bastian Koppelmann , Greg Kurz , Max Filippov On Thu, Oct 20, 2016 at 01:26:01PM +0200, Laurent Vivier wrote: > Since commit 42ecaba ("target-i386: Call cpu_exec_init() on realize"), > , commit 6dd0f83 ("target-ppc: Move cpu_exec_init() call to realize function"), > and commit c6644fc ("s390x/cpu: Get rid of side effects when creating a vcpu"), > cpu_exec_init() has been moved to realize function for some architectures > to implement CPU htoplug. This allows any failures from cpu_exec_init() to be > handled appropriately. > > This series tries to do the same work for all the other CPUs. > > But as the ARM Virtual Machine ("virt") needs the "memory" property of the CPU > in the machine init function (the "memory" property is created in > cpu_exec_init() we want to move to the realize part), split cpu_exec_init() in > two parts: a realize part (cpu_exec_realizefn(), adding the CPU in the > environment) and an init part (cpu_exec_initfn(), initializing the CPU, like > adding the "memory" property). To mirror the realize part, add an unrealize > part, and remove the cpu_exec_exit() call from the finalize part. > > This also allows to remove all the "cannot_destroy_with_object_finalize_yet" > properties from the CPU device class. > > v5: > - rebase master > - arm: define ARM_DEFAULT_CPUS_PER_CLUSTER, ARM64_AFFINITY_INVALID, > and move variable declaration into the "if" block. [...] Applied to machine-next. Thanks! -- Eduardo