All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-arm] [PATCH v3 0/3] Split cpu_exec_init() into an init and a realize part
@ 2016-10-14 22:52 ` Laurent Vivier
  0 siblings, 0 replies; 78+ messages in thread
From: Laurent Vivier @ 2016-10-14 22:52 UTC (permalink / raw)
  To: Eduardo Habkost, Igor Mammedov, Bharata B Rao, David Gibson,
	Peter Maydell
  Cc: Matthew Rosato, Laurent Vivier, Jia Liu, Max Filippov,
	Markus Armbruster, Anthony Green, Alexander Graf,
	Bastian Koppelmann, qemu-devel, Greg Kurz, Michael Walle,
	qemu-arm, qemu-ppc, Aurelien Jarno, Greg Ungerer, Paolo Bonzini,
	Chen Gang, Guan Xuetao, Artyom Tarasenko, Richard Henderson

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.

v3:
- reorganize the series in 3 patches:
  1- split cpu_exec_init() and call the init part from
     cpu_common_initfn()
  2- move all the cpu_exec_realize() calls to the
     XXX_cpu_realizefn() functions
  3- create a cpu_common_unrealizefn() function
      and call the cpu_exec_unrealize() function from here,
      except for ppc64 and i386 that have their own XX_cpu_unrealizefn()
      functions
- rename cpu_exec_init(), cpu_exec_realize(), cpu_exec_unrealize()
  to cpu_exec_initfn(), cpu_exec_realizefn() and cpu_exec_unrealizefn(),
- move cpu_exec_unrealizefn() to the device class unrealize
  and declare it in qom/cpu.h instead of exec/exec-all.h

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 (3):
  exec: split cpu_exec_init()
  exec: rename cpu_exec_init() as cpu_exec_realizefn()
  exec: call cpu_exec_exit() from a CPU unrealize common function

 exec.c                      | 12 +++++++-----
 include/exec/exec-all.h     |  1 -
 include/qom/cpu.h           |  4 +++-
 qom/cpu.c                   | 10 +++++++++-
 target-alpha/cpu.c          | 15 +++++++--------
 target-arm/cpu.c            | 39 +++++++++++++++++----------------------
 target-cris/cpu.c           | 15 +++++++--------
 target-i386/cpu.c           | 13 +++++++------
 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, 148 insertions(+), 158 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2016-10-24  7:25 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-14 22:52 [Qemu-arm] [PATCH v3 0/3] Split cpu_exec_init() into an init and a realize part Laurent Vivier
2016-10-14 22:52 ` [Qemu-devel] " Laurent Vivier
2016-10-14 22:52 ` [Qemu-arm] [PATCH v3 1/3] exec: split cpu_exec_init() Laurent Vivier
2016-10-14 22:52   ` [Qemu-devel] " Laurent Vivier
2016-10-17  3:43   ` [Qemu-arm] " David Gibson
2016-10-17  3:43     ` [Qemu-devel] " David Gibson
2016-10-17 11:15   ` [Qemu-arm] " Igor Mammedov
2016-10-17 11:15     ` [Qemu-devel] " Igor Mammedov
2016-10-17 18:46   ` [Qemu-arm] " Eduardo Habkost
2016-10-17 18:46     ` [Qemu-devel] " Eduardo Habkost
2016-10-14 22:52 ` [Qemu-arm] [PATCH v3 2/3] exec: rename cpu_exec_init() as cpu_exec_realizefn() Laurent Vivier
2016-10-14 22:52   ` [Qemu-devel] " Laurent Vivier
2016-10-17  3:43   ` David Gibson
2016-10-17  3:43     ` David Gibson
2016-10-17 11:20   ` [Qemu-arm] " Igor Mammedov
2016-10-17 11:20     ` [Qemu-devel] " Igor Mammedov
2016-10-17 14:03   ` [Qemu-arm] " Eduardo Habkost
2016-10-17 14:03     ` [Qemu-devel] " Eduardo Habkost
2016-10-17 14:25     ` [Qemu-arm] " Laurent Vivier
2016-10-17 14:25       ` [Qemu-devel] " Laurent Vivier
2016-10-17 19:20   ` [Qemu-arm] " Eduardo Habkost
2016-10-17 19:20     ` [Qemu-devel] " Eduardo Habkost
2016-10-18 10:48     ` [Qemu-arm] " Igor Mammedov
2016-10-18 10:48       ` [Qemu-devel] " Igor Mammedov
2016-10-18 13:00     ` [Qemu-arm] " Andrew Jones
2016-10-18 13:00       ` Andrew Jones
2016-10-18 13:18       ` [Qemu-arm] " Eduardo Habkost
2016-10-18 13:18         ` Eduardo Habkost
2016-10-18 14:22         ` Andrew Jones
2016-10-18 14:22           ` Andrew Jones
2016-10-18 15:22           ` [Qemu-arm] " Eduardo Habkost
2016-10-18 15:22             ` Eduardo Habkost
2016-10-18 16:22             ` Andrew Jones
2016-10-18 16:22               ` Andrew Jones
2016-10-18 16:57               ` [Qemu-arm] " Laurent Vivier
2016-10-18 16:57                 ` Laurent Vivier
2016-10-18 17:07               ` [Qemu-arm] " Peter Maydell
2016-10-18 17:07                 ` Peter Maydell
2016-10-18 17:57                 ` [Qemu-arm] " Andrew Jones
2016-10-18 17:57                   ` Andrew Jones
2016-10-18 18:12                   ` [Qemu-arm] " Peter Maydell
2016-10-18 18:12                     ` Peter Maydell
2016-10-18 18:45                     ` [Qemu-arm] QOM properties vs C functions/fields (was Re: [Qemu-devel] [PATCH v3 2/3] exec: rename cpu_exec_init() as cpu_exec_realizefn()) Eduardo Habkost
2016-10-18 18:45                       ` [Qemu-devel] QOM properties vs C functions/fields (was " Eduardo Habkost
2016-10-18 18:45                       ` Eduardo Habkost
2016-10-18 20:30                       ` [Qemu-arm] QOM properties vs C functions/fields (was Re: [Qemu-devel] " Peter Maydell
2016-10-18 20:30                         ` [Qemu-devel] QOM properties vs C functions/fields (was " Peter Maydell
2016-10-18 20:30                         ` Peter Maydell
2016-10-18 20:49                         ` [Qemu-arm] QOM properties vs C functions/fields (was Re: [Qemu-devel] " Eduardo Habkost
2016-10-18 20:49                           ` [Qemu-devel] QOM properties vs C functions/fields (was " Eduardo Habkost
2016-10-18 20:49                           ` Eduardo Habkost
2016-10-18 21:08                           ` Peter Maydell
2016-10-18 21:08                             ` Peter Maydell
2016-10-18 21:08                             ` [Qemu-arm] QOM properties vs C functions/fields (was Re: [Qemu-devel] " Peter Maydell
2016-10-19 11:11                             ` Eduardo Habkost
2016-10-19 11:11                               ` [Qemu-devel] QOM properties vs C functions/fields (was " Eduardo Habkost
2016-10-19 11:11                               ` Eduardo Habkost
2016-10-19 11:22                               ` [Qemu-arm] QOM properties vs C functions/fields (was Re: [Qemu-devel] " Peter Maydell
2016-10-19 11:22                                 ` [Qemu-devel] QOM properties vs C functions/fields (was " Peter Maydell
2016-10-19 11:22                                 ` Peter Maydell
2016-10-21 18:26                             ` [Qemu-arm] " Markus Armbruster
2016-10-21 18:26                               ` Markus Armbruster
2016-10-22  9:31                               ` [Qemu-arm] " Peter Maydell
2016-10-22  9:31                                 ` Peter Maydell
2016-10-24  7:24                                 ` [Qemu-arm] " Markus Armbruster
2016-10-24  7:24                                   ` Markus Armbruster
2016-10-14 22:52 ` [Qemu-arm] [PATCH v3 3/3] exec: call cpu_exec_exit() from a CPU unrealize common function Laurent Vivier
2016-10-14 22:52   ` [Qemu-devel] " Laurent Vivier
2016-10-17  3:43   ` David Gibson
2016-10-17  3:43     ` David Gibson
2016-10-17 11:30   ` Igor Mammedov
2016-10-17 11:30     ` Igor Mammedov
2016-10-17  3:44 ` [Qemu-arm] [PATCH v3 0/3] Split cpu_exec_init() into an init and a realize part David Gibson
2016-10-17  3:44   ` [Qemu-devel] " David Gibson
2016-10-17 18:47   ` [Qemu-arm] " Eduardo Habkost
2016-10-17 18:47     ` [Qemu-devel] " Eduardo Habkost
2016-10-17 22:50     ` [Qemu-arm] " David Gibson
2016-10-17 22:50       ` [Qemu-devel] " David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.