From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brs1w-0001AC-Uh for qemu-devel@nongnu.org; Wed, 05 Oct 2016 15:39:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brs1s-0007Sv-Ms for qemu-devel@nongnu.org; Wed, 05 Oct 2016 15:39:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brs1s-0007SF-DM for qemu-devel@nongnu.org; Wed, 05 Oct 2016 15:39:00 -0400 From: Laurent Vivier Date: Wed, 5 Oct 2016 21:38:34 +0200 Message-Id: <1475696333-8706-1-git-send-email-lvivier@redhat.com> Subject: [Qemu-devel] [PATCH 00/19] Split cpu_exec_init() into an init and a realize part List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: David Gibson , Paolo Bonzini , Markus Armbruster , Eduardo Habkost , Bharata B Rao , Peter Maydell , Matthew Rosato , Laurent Vivier 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_realize(), adding the CPU in the environment) and an init part (cpu_exec_init(), initializing the CPU, like adding the "memory" property). For target-i386, target-s390 and target-ppc, we move back the cpu_exec_init() into the init part, and put the cpu_exec_realize() into the realize part. For all the other CPUs, we add the cpu_exec_realize() function into the realize part. This also allows to remove all the "cannot_destroy_with_object_finalize_yet" properties from the CPU device class. Laurent Vivier (19): exec: split cpu_exec_init() target-i386: move back cpu_exec_init() to init target-ppc: move back cpu_exec_init() to init target-s390: move back cpu_exec_init() to init target-arm: move cpu_exec_realize() to realize function target-alpha: move cpu_exec_realize() to realize function target-cris: move cpu_exec_realize() to realize function target-lm32: move cpu_exec_realize() to realize function target-m68k: move cpu_exec_realize() to realize function target-microblaze: move cpu_exec_realize() to realize function target-mips: move cpu_exec_realize() to realize function target-moxie: move cpu_exec_realize() to realize function target-openrisc: move cpu_exec_realize() to realize function target-sh4: move cpu_exec_realize() to realize function target-sparc: move cpu_exec_realize() to realize function target-tilegx: move cpu_exec_realize() to realize function target-tricore: move cpu_exec_realize() to realize function target-unicore32: move cpu_exec_realize() to realize function target-xtensa: move cpu_exec_realize() to realize function exec.c | 8 +++++--- include/exec/exec-all.h | 1 + target-alpha/cpu.c | 14 +++++++------- target-arm/cpu.c | 18 +++++++----------- target-cris/cpu.c | 14 +++++++------- target-i386/cpu.c | 12 ++++++------ target-lm32/cpu.c | 14 +++++++------- target-m68k/cpu.c | 14 +++++++------- target-microblaze/cpu.c | 13 +++++++------ target-mips/cpu.c | 14 +++++++------- target-moxie/cpu.c | 14 +++++++------- target-openrisc/cpu.c | 14 +++++++------- target-ppc/translate_init.c | 3 ++- target-s390x/cpu.c | 9 ++------- target-sh4/cpu.c | 14 +++++++------- target-sparc/cpu.c | 17 +++++++++-------- target-tilegx/cpu.c | 14 +++++++------- target-tricore/cpu.c | 14 +++++++------- target-unicore32/cpu.c | 17 +++++++++-------- target-xtensa/cpu.c | 14 +++++++------- 20 files changed, 125 insertions(+), 127 deletions(-) -- 2.7.4