From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: ehabkost@redhat.com, blauwirbel@gmail.com, anthony@codemonkey.ws,
imammedo@redhat.com, "Andreas Färber" <afaerber@suse.de>,
"Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH qom-cpu-next v3 0/4] target-i386: X86CPU subclasses
Date: Sat, 2 Feb 2013 01:37:04 +0100 [thread overview]
Message-ID: <1359765428-27805-1-git-send-email-afaerber@suse.de> (raw)
Hello,
Long announced, here it is after the freeze: My 3rd attempt at CPU subclasses.
v3 is closer to v1 again, slimmed down not to touch x86_def_t much.
It was noticed that in theory a QOM class enumeration could lead to the host
CPU class_init running before kvm_init(). My proposal is to make the class_init
reentrant and to re-run it from target-i386's kvm_arch_init() if necessary.
Similar to target-ppc, -cpu host code is placed into kvm.c rather than cpu.c.
This conversion is an interim solution to get the code structured in a
QOM-friendly way and to reach a hot-plug friendly and cross-target aligned
CPU initialization. It decouples the work of introducing subclasses (to hide
object initialization from cpu_init() and device_add) from any x86-internal
improvements (like Igor's global compat properties set from pc-x.y machines).
The -cpu ? and QMP support is still based on array iteration.
Based on qom-cpu-next queue, which contains some cpu_init() cleanups already.
Available for testing here:
git://github.com/afaerber/qemu-cpu.git qom-cpu-x86-subclasses.v3
https://github.com/afaerber/qemu-cpu/commits/qom-cpu-x86-subclasses.v3
Regards,
Andreas
v2 -> v3:
* Instead of re-coding all CPU definitions as class_init functions, leave
the built-in definition array in place and place x86_def_t in the class.
* Use kvm_arch_init() hook to assure class_init succeeds for -cpu host.
Suggested by Eduardo.
v1-> v2:
* Instead of turning x86_def_t into X86CPUInfo to initialize classes,
drop it completely and register types manually with customizable TypeInfos
* Use new list facilities for printing -cpu ? models
* Adopt new name scheme suggested by Eduardo and ideas from my alpha series
* Keep short names in -cpu ? output for alignment reasons
* Merge cpu_x86_init() into cpu.c:cpu_x86_register()
* Append patch showing Haswell as subclass of SandyBridge
Cc: Anthony Liguori <anthony@codemonkey.ws>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Andreas Färber (4):
target-i386: Move cpu_x86_init()
target-i386: Split command line parsing out of cpu_x86_register()
target-i386: Slim conversion to X86CPU subclasses
Remove cpudef_setup() hooks
arch_init.c | 7 -
bsd-user/main.c | 3 -
include/sysemu/arch_init.h | 1 -
linux-user/main.c | 3 -
target-i386/cpu-qom.h | 24 ++++
target-i386/cpu.c | 326 ++++++++++++++++++--------------------------
target-i386/cpu.h | 3 -
target-i386/helper.c | 24 ----
target-i386/kvm.c | 93 +++++++++++++
vl.c | 7 -
10 Dateien geändert, 247 Zeilen hinzugefügt(+), 244 Zeilen entfernt(-)
--
1.7.10.4
next reply other threads:[~2013-02-02 0:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-02 0:37 Andreas Färber [this message]
2013-02-02 0:37 ` [Qemu-devel] [PATCH qom-cpu-next v3 1/4] target-i386: Move cpu_x86_init() Andreas Färber
2013-02-02 0:37 ` [Qemu-devel] [PATCH qom-cpu-next v3 2/4] target-i386: Split command line parsing out of cpu_x86_register() Andreas Färber
2013-02-02 0:37 ` [Qemu-devel] [PATCH qom-cpu-next v3 3/4] target-i386: Slim conversion to X86CPU subclasses Andreas Färber
2013-02-02 0:37 ` [Qemu-devel] [PATCH qom-cpu-next v3 4/4] Remove cpudef_setup() hooks Andreas Färber
2013-02-02 8:01 ` [Qemu-devel] [PATCH qom-cpu-next v3 0/4] target-i386: X86CPU subclasses 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=1359765428-27805-1-git-send-email-afaerber@suse.de \
--to=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=blauwirbel@gmail.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=qemu-devel@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).