From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Jia Liu" <proljc@gmail.com>, "Alexander Graf" <agraf@suse.de>,
"Blue Swirl" <blauwirbel@gmail.com>,
"Max Filippov" <jcmvbkbc@gmail.com>,
"Michael Walle" <michael@walle.cc>,
qemu-ppc <qemu-ppc@nongnu.org>,
"Anthony Liguori" <anthony@codemonkey.ws>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Guan Xuetao" <gxt@mprc.pku.edu.cn>,
"Andreas Färber" <afaerber@suse.de>,
"Aurélien Jarno" <aurelien@aurel32.net>,
"Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [RFC qom-cpu 00/15] CPUState QOM realizefn support
Date: Wed, 16 Jan 2013 06:32:45 +0100 [thread overview]
Message-ID: <1358314380-9400-1-git-send-email-afaerber@suse.de> (raw)
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 <anthony@codemonkey.ws>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Richard Henderson <rth@twiddle.net> (alpha, s390)
Cc: Peter Maydell <peter.maydell@linaro.org> (arm)
Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com> (cris, microblaze)
Cc: Michael Walle <michael@walle.cc> (lm32)
Cc: Aurélien Jarno <aurelien@aurel32.net> (mips, sh4)
Cc: Alexander Graf <agraf@suse.de> (ppc, s390)
Cc: qemu-ppc <qemu-ppc@nongnu.org>
Cc: Blue Swirl <blauwirbel@gmail.com> (sparc)
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> (unicore32)
Cc: Max Filippov <jcmvbkbc@gmail.com> (xtensa)
Cc: Jia Liu <proljc@gmail.com> (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
next reply other threads:[~2013-01-16 5:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 5:32 Andreas Färber [this message]
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 01/15] target-alpha: Update CPU to QOM realizefn Andreas Färber
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 02/15] target-arm: " Andreas Färber
2013-01-16 15:52 ` Eduardo Habkost
2013-01-16 22:37 ` Andreas Färber
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 03/15] target-i386: " Andreas Färber
2013-01-16 13:12 ` Igor Mammedov
2013-01-16 16:04 ` Eduardo Habkost
2013-01-16 22:52 ` Andreas Färber
2013-01-16 23:43 ` Eduardo Habkost
2013-01-17 8:03 ` Andreas Färber
2013-01-17 12:58 ` Eduardo Habkost
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 04/15] target-openrisc: " Andreas Färber
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 05/15] target-ppc: " Andreas Färber
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 06/15] target-cris: Introduce QOM realizefn for CRISCPU Andreas Färber
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 07/15] target-lm32: Introduce QOM realizefn for LM32CPU Andreas Färber
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 08/15] target-m68k: Introduce QOM realizefn for M68kCPU Andreas Färber
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 09/15] target-microblaze: Introduce QOM realizefn for MicroBlazeCPU Andreas Färber
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 10/15] target-mips: Introduce QOM realizefn for MIPSCPU Andreas Färber
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 11/15] target-s390x: Introduce QOM realizefn for S390CPU Andreas Färber
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 12/15] target-sh4: Introduce QOM realizefn for SuperHCPU Andreas Färber
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 13/15] target-sparc: Introduce QOM realizefn for SPARCCPU Andreas Färber
2013-01-16 5:32 ` [Qemu-devel] [RFC qom-cpu 14/15] target-unicore32: Introduce QOM realizefn for UniCore32CPU Andreas Färber
2013-01-16 12:08 ` guanxuetao
2013-01-16 5:33 ` [Qemu-devel] [RFC qom-cpu 15/15] target-xtensa: Introduce QOM realizefn for XtensaCPU Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358314380-9400-1-git-send-email-afaerber@suse.de \
--to=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=anthony@codemonkey.ws \
--cc=aurelien@aurel32.net \
--cc=blauwirbel@gmail.com \
--cc=edgar.iglesias@gmail.com \
--cc=ehabkost@redhat.com \
--cc=gxt@mprc.pku.edu.cn \
--cc=imammedo@redhat.com \
--cc=jcmvbkbc@gmail.com \
--cc=michael@walle.cc \
--cc=peter.maydell@linaro.org \
--cc=proljc@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).