Received: from eggs.gnu.org ([208.118.235.92]:39378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvLck-0003Da-HU for qemu-devel@nongnu.org; Wed, 16 Jan 2013 00:33:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvLci-0007xq-FV for qemu-devel@nongnu.org; Wed, 16 Jan 2013 00:33:18 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 16 Jan 2013 06:32:45 +0100 Message-Id: <1358314380-9400-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [RFC qom-cpu 00/15] CPUState QOM realizefn support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Eduardo Habkost , Jia Liu , Alexander Graf , Blue Swirl , Max Filippov , Michael Walle , qemu-ppc , Anthony Liguori , "Edgar E. Iglesias" , Igor Mammedov , Guan Xuetao , =?UTF-8?q?Andreas=20F=C3=A4rber?= , =?UTF-8?q?Aur=C3=A9lien=20Jarno?= , Richard Henderson 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__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 importantl= y 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 realizef= n, as done for CPUClass::reset today. As next step I intend to pull the realized =3D true bit out of cpu_init()= , with *-user setting realized =3D 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 Cc: Eduardo Habkost Cc: Igor Mammedov Cc: Richard Henderson (alpha, s390) Cc: Peter Maydell (arm) Cc: Edgar E. Iglesias (cris, microblaze) Cc: Michael Walle (lm32) Cc: Aur=C3=A9lien Jarno (mips, sh4) Cc: Alexander Graf (ppc, s390) Cc: qemu-ppc Cc: Blue Swirl (sparc) Cc: Guan Xuetao (unicore32) Cc: Max Filippov (xtensa) Cc: Jia Liu (openrisc) Andreas F=C3=A4rber (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=C3=A4ndert, 173 Zeilen hinzugef=C3=BCgt(+), 47 Zeilen entf= ernt(-) --=20 1.7.10.4