qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC qom-cpu 00/15] CPUState QOM realizefn support


From: Andreas Färber
Subject: [Qemu-devel] [RFC qom-cpu 00/15] CPUState QOM realizefn support
Date: Wed, 16 Jan 2013 06:32:45 +0100

Hello,

This series is one of the missing puzzle pieces to allow using device_add
for CPU hotplug mentioned on yesterdays's KVM call.

Historically, CPUs are created through cpu_init() macro aliased to
cpu_<arch>_init() functions. Since v1.1 these all create a QOM object and
then somehow "fiddle" with it as before.
QOM realize allows us to make some of this code accessible to DeviceClass
so that the existing device infrastructure can invoke it. Most importantly
this is needed to actually initialize the TCG thread / KVM vCPU. :)

I do not consider this Soft Freeze material and would like to queue this
on my qom-cpu-next branch for v1.5. Only partially tested so far.

alpha and unicore32 are still lacking a CPUClass::reset implementation.
Once all are implemented, the cpu_reset() call would be moved to qom/cpu.c,
and all target CPU realizefns would need to call the base type's realizefn,
as done for CPUClass::reset today.

As next step I intend to pull the realized = true bit out of cpu_init(),
with *-user setting realized = true after cpu_init() and vl.c iterating
over the CPUs in the final central location, before machine reset.

Regards,
Andreas

Changes from sh4 subclasses series:
* Adopted QOM realizefn signature, dropped error.h inclusion.

Cc: Anthony Liguori <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: Richard Henderson <address@hidden> (alpha, s390)
Cc: Peter Maydell <address@hidden> (arm)
Cc: Edgar E. Iglesias <address@hidden> (cris, microblaze)
Cc: Michael Walle <address@hidden> (lm32)
Cc: Aurélien Jarno <address@hidden> (mips, sh4)
Cc: Alexander Graf <address@hidden> (ppc, s390)
Cc: qemu-ppc <address@hidden>
Cc: Blue Swirl <address@hidden> (sparc)
Cc: Guan Xuetao <address@hidden> (unicore32)
Cc: Max Filippov <address@hidden> (xtensa)
Cc: Jia Liu <address@hidden> (openrisc)

Andreas Färber (15):
  target-alpha: Update CPU to QOM realizefn
  target-arm: Update CPU to QOM realizefn
  target-i386: Update CPU to QOM realizefn
  target-openrisc: Update CPU to QOM realizefn
  target-ppc: Update CPU to QOM realizefn
  target-cris: Introduce QOM realizefn for CRISCPU
  target-lm32: Introduce QOM realizefn for LM32CPU
  target-m68k: Introduce QOM realizefn for M68kCPU
  target-microblaze: Introduce QOM realizefn for MicroBlazeCPU
  target-mips: Introduce QOM realizefn for MIPSCPU
  target-s390x: Introduce QOM realizefn for S390CPU
  target-sh4: Introduce QOM realizefn for SuperHCPU
  target-sparc: Introduce QOM realizefn for SPARCCPU
  target-unicore32: Introduce QOM realizefn for UniCore32CPU
  target-xtensa: Introduce QOM realizefn for XtensaCPU

 target-alpha/cpu.c            |   15 +++++++++++----
 target-arm/cpu-qom.h          |    1 -
 target-arm/cpu.c              |   15 ++++++++-------
 target-arm/helper.c           |    7 ++++---
 target-cris/cpu.c             |   11 +++++++++++
 target-cris/translate.c       |    3 +--
 target-i386/cpu-qom.h         |    3 ---
 target-i386/cpu.c             |    7 +++++--
 target-i386/helper.c          |    2 +-
 target-lm32/cpu.c             |   14 ++++++++++++--
 target-lm32/helper.c          |    4 ++--
 target-m68k/cpu.c             |   11 +++++++++++
 target-m68k/helper.c          |    3 +--
 target-microblaze/cpu.c       |   11 +++++++++++
 target-microblaze/translate.c |    3 +--
 target-mips/cpu.c             |   11 +++++++++++
 target-mips/translate.c       |    5 +++--
 target-openrisc/cpu.c         |    9 ++++++---
 target-openrisc/cpu.h         |    2 --
 target-ppc/translate_init.c   |    9 ++++++---
 target-s390x/cpu.c            |   10 ++++++++++
 target-s390x/helper.c         |    4 +++-
 target-sh4/cpu.c              |   11 +++++++++++
 target-sh4/translate.c        |    5 +++--
 target-sparc/cpu.c            |   13 ++++++++++++-
 target-unicore32/cpu.c        |   15 +++++++++++++++
 target-unicore32/helper.c     |    2 +-
 target-xtensa/cpu.c           |   10 ++++++++++
 target-xtensa/helper.c        |    4 +++-
 29 Dateien geändert, 173 Zeilen hinzugefügt(+), 47 Zeilen entfernt(-)

-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]