qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/20] Split cpu_exec_init() into an init and a realize part
@ 2016-10-13 16:24 Laurent Vivier
  2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 01/20] exec: split cpu_exec_init() Laurent Vivier
                   ` (19 more replies)
  0 siblings, 20 replies; 41+ messages in thread
From: Laurent Vivier @ 2016-10-13 16:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Gibson, Paolo Bonzini, Peter Maydell, Eduardo Habkost,
	Bharata B Rao, Markus Armbruster, 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.

v2:
- rename cpu_exec_exit() as cpu_exec_unrealize(),
  as it un-does what cpu_exec_realize() does,
- remove cpu_exec_exit() from ppc_cpu_unrealizefn() as
  it is called from cpu_common_finalize(),
- add a patch to move all cpu_exec_init() from
  all XX_cpu_initfn() to cpu_common_initfn(),
- arm: move setting of cpu->mp_affinity to
  arm_cpu_realizefn() as the cpu_index is now set in
  cpu_exec_realizefn().
- update some commit messages

Laurent Vivier (20):
  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: move cpu_exec_init() to cpu_common_initfn()

 exec.c                      | 12 +++++++-----
 include/exec/exec-all.h     |  2 +-
 include/qom/cpu.h           |  3 ++-
 qom/cpu.c                   |  4 +++-
 target-alpha/cpu.c          | 15 +++++++--------
 target-arm/cpu.c            | 39 +++++++++++++++++----------------------
 target-cris/cpu.c           | 15 +++++++--------
 target-i386/cpu.c           | 11 +++++------
 target-lm32/cpu.c           | 15 +++++++--------
 target-m68k/cpu.c           | 15 +++++++--------
 target-microblaze/cpu.c     | 14 +++++++-------
 target-mips/cpu.c           | 15 +++++++--------
 target-moxie/cpu.c          | 15 +++++++--------
 target-openrisc/cpu.c       | 15 +++++++--------
 target-ppc/translate_init.c |  4 +---
 target-s390x/cpu.c          |  8 +-------
 target-sh4/cpu.c            | 15 +++++++--------
 target-sparc/cpu.c          | 18 +++++++++---------
 target-tilegx/cpu.c         | 15 +++++++--------
 target-tricore/cpu.c        | 15 +++++++--------
 target-unicore32/cpu.c      | 18 +++++++++---------
 target-xtensa/cpu.c         | 15 +++++++--------
 22 files changed, 139 insertions(+), 159 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2016-10-14 17:29 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13 16:24 [Qemu-devel] [PATCH v2 00/20] Split cpu_exec_init() into an init and a realize part Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 01/20] exec: split cpu_exec_init() Laurent Vivier
2016-10-14  4:05   ` David Gibson
2016-10-14  7:56   ` Greg Kurz
2016-10-14 12:13     ` Laurent Vivier
2016-10-14 15:04       ` Greg Kurz
2016-10-14 13:55   ` Igor Mammedov
2016-10-14 13:57     ` Laurent Vivier
2016-10-14 14:11   ` Igor Mammedov
2016-10-14 14:13     ` Laurent Vivier
2016-10-14 14:26       ` Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 02/20] target-i386: move back cpu_exec_init() to init Laurent Vivier
2016-10-14 13:33   ` Eduardo Habkost
2016-10-14 13:34     ` Laurent Vivier
2016-10-14 13:48       ` Eduardo Habkost
2016-10-14 14:12         ` Laurent Vivier
2016-10-14 14:31           ` Eduardo Habkost
2016-10-14 14:33         ` Igor Mammedov
2016-10-14 14:43           ` Eduardo Habkost
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 03/20] target-ppc: " Laurent Vivier
2016-10-14  4:07   ` David Gibson
2016-10-14  7:12     ` Laurent Vivier
2016-10-14 14:49     ` Bharata B Rao
2016-10-14 17:26       ` Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 04/20] target-s390: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 05/20] target-arm: move cpu_exec_realize() to realize function Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 06/20] target-alpha: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 07/20] target-cris: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 08/20] target-lm32: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 09/20] target-m68k: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 10/20] target-microblaze: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 11/20] target-mips: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 12/20] target-moxie: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 13/20] target-openrisc: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 14/20] target-sh4: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 15/20] target-sparc: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 16/20] target-tilegx: " Laurent Vivier
2016-10-13 16:24 ` [Qemu-devel] [PATCH v2 17/20] target-tricore: " Laurent Vivier
2016-10-13 16:25 ` [Qemu-devel] [PATCH v2 18/20] target-unicore32: " Laurent Vivier
2016-10-13 16:25 ` [Qemu-devel] [PATCH v2 19/20] target-xtensa: " Laurent Vivier
2016-10-13 16:25 ` [Qemu-devel] [PATCH v2 20/20] exec: move cpu_exec_init() to cpu_common_initfn() Laurent Vivier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).