From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>,
patches@linaro.org, Peter Maydell <peter.maydell@linaro.org>,
Marcel Apfelbaum <marcel@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
David Gibson <david@gibson.dropbear.id.au>,
qemu-arm@nongnu.org, qemu-ppc@nongnu.org,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [RFC 0/3] generalize parsing of cpu_model
Date: Fri, 17 Feb 2017 19:56:32 +0100 [thread overview]
Message-ID: <1487357795-52614-1-git-send-email-imammedo@redhat.com> (raw)
Some callers call CPUClass->parse_features manually to convert
'-cpu cpufoo,featurestr' string to cpu type and featurestr
into a set of global properties. And theni do controlled
cpu creation with setting properties and completing it with realize.
That's a lot of code duplication as they are practically
reimplement the same parsing logic.
Some don't and use cpu_generic_init() instead which does
the same parsing along with creation/realizing cpu within one
wrapper.
And some trying to switch to controlled cpu creation,
implement object_new()/set properties/realize steps
but forget feature parsing logic witch lieads to 'bugs'
commit 00909b585 (hw/arm/integratorcp: Support specifying features via -cpu)
This series moves -cpu option parsing to generic machine code
that removes a little of code duplication and makes cpus creation
process more unified.
PS:
As I don't have time to rewrite this part QEMU, being busy
rewritting yet another part of QEMU,
SERIES IS UNFINISHED AND SERVERS TO SHOW IDEA HOW IT SHOULD
BE DONE. FEEL FREE TO PICK UP AND COMPLETE THIS PATCHES
TO HANDLE ALL BOARDS (series does it only for virt-arm/spapr/pc)
It compiles and pc machine even starts but otherwise is untested.
CC: Eduardo Habkost <ehabkost@redhat.com>
CC: patches@linaro.org
CC: Peter Maydell <peter.maydell@linaro.org>
CC: Marcel Apfelbaum <marcel@redhat.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: David Gibson <david@gibson.dropbear.id.au>
CC: qemu-arm@nongnu.org
CC: qemu-ppc@nongnu.org
CC: "Michael S. Tsirkin" <mst@redhat.com>
Igor Mammedov (3):
machine: call machine init from wrapper
machine: generalize handling of default cpu_model
machine: generilize cpu_model parsing
include/hw/boards.h | 5 +++++
include/hw/ppc/ppc.h | 2 --
hw/arm/virt.c | 46 ++++++++++---------------------------------
hw/core/machine.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++
hw/i386/pc.c | 42 +++++++++++++--------------------------
hw/ppc/ppc.c | 25 ------------------------
hw/ppc/spapr.c | 14 +++++++------
vl.c | 2 +-
8 files changed, 92 insertions(+), 99 deletions(-)
--
2.7.4
next reply other threads:[~2017-02-17 18:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 18:56 Igor Mammedov [this message]
2017-02-17 18:56 ` [Qemu-devel] [RFC 1/3] machine: call machine init from wrapper Igor Mammedov
2017-02-17 18:56 ` [Qemu-devel] [RFC 2/3] machine: generalize handling of default cpu_model Igor Mammedov
2017-02-17 18:56 ` [Qemu-devel] [RFC 3/3] machine: generilize cpu_model parsing Igor Mammedov
2017-02-17 19:05 ` [Qemu-devel] [RFC 0/3] generalize parsing of cpu_model Peter Maydell
2017-02-20 18:55 ` Igor Mammedov
2017-02-20 19:11 ` Peter Maydell
2017-02-21 12:44 ` Igor Mammedov
2017-02-21 12:55 ` Peter Maydell
2017-02-21 13:56 ` Markus Armbruster
2017-02-21 13:57 ` Peter Maydell
2017-02-21 15:48 ` Markus Armbruster
2017-02-21 18:21 ` Eduardo Habkost
2017-02-21 16:18 ` Paolo Bonzini
2017-02-21 17:59 ` Peter Maydell
2017-02-21 18:41 ` Eduardo Habkost
2017-02-21 18:28 ` Eduardo Habkost
2017-02-21 19:32 ` Peter Maydell
2017-02-22 13:30 ` Igor Mammedov
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=1487357795-52614-1-git-send-email-imammedo@redhat.com \
--to=imammedo@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=ehabkost@redhat.com \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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).