qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Anthony Liguori" <aliguori@us.ibm.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Paul Brook" <paul@codesourcery.com>
Subject: [Qemu-devel] [PATCH RFC 0/7] Introduce QOM CPU and use for target-arm
Date: Sun, 29 Jan 2012 14:25:24 +0100	[thread overview]
Message-ID: <1327843531-32403-1-git-send-email-afaerber@suse.de> (raw)

Hello,

Here's a series against master, pushing QOM beyond what I've seen on Anthony's
qom-upstream and qom-rebase branches.
It depends on the object_class_foreach() fix posted separately.

Patch 1 is included here to show its use case in patch 5.

Patch 2 suggests a way to start using QOM beyond "devices" in system emulation.
Patch 3 suggests a way to integrate QOM into the user emulators as well.

Patches 4-5 introduce a CPU class and prepare its use in system and user mode.

Patches 6-7 build upon this infrastructure and start using it for ARM.

This series is surely not yet the final goal as discussed on IRC. It does help
with my and Peter's quest to further clean up the constantly growing mess
surrounding ARM reset vs. one-time initialization though.

The plan there is to get rid of the huge CPUID switch by moving the knowledge
of reset values to CPU classes and by dumb copying of values from class to
instance on reset. The latter for now requires to be able to obtain the
ObjectClass matching a CPUState - in target-specific code this works by simple
pointer arithmetic, encapsulated in a macro.

So, in a spirit similar to Anthony's i440FX rework I'm posting this to check if
I'm on the right track here before I start messing around with other targets.

Regards,
Andreas

Cc: Anthony Liguori <aliguori@us.ibm.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Paul Brook <paul@codesourcery.com>

Andreas Färber (7):
  qom: Introduce object_class_is_abstract()
  qom: Register QOM infrastructure early
  qom: Add QOM support to user emulators
  qom: Introduce CPU class
  cpu: Introduce cpu_class_foreach()
  target-arm: Introduce QOM CPU and use for it CPUID lookup
  target-arm: Embed CPUARMState in QOM ARMCPU

 Makefile.objs         |    1 +
 Makefile.target       |   16 +++-
 Makefile.user         |    1 +
 arch_init.c           |    1 +
 bsd-user/main.c       |    3 +
 darwin-user/main.c    |    4 +
 hw/cpu.c              |   52 +++++++++
 include/qemu/cpu.h    |   36 +++++++
 include/qemu/object.h |    8 ++
 linux-user/main.c     |    3 +
 module.h              |    4 +
 qom/object.c          |    7 +-
 target-arm/cpu-core.c |  281 +++++++++++++++++++++++++++++++++++++++++++++++++
 target-arm/cpu-core.h |   40 +++++++
 target-arm/helper.c   |   87 +++++-----------
 vl.c                  |    2 +
 16 files changed, 480 insertions(+), 66 deletions(-)
 create mode 100644 hw/cpu.c
 create mode 100644 include/qemu/cpu.h
 create mode 100644 target-arm/cpu-core.c
 create mode 100644 target-arm/cpu-core.h

-- 
1.7.7

             reply	other threads:[~2012-01-29 13:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-29 13:25 Andreas Färber [this message]
2012-01-29 13:25 ` [Qemu-devel] [PATCH 1/7][RESEND] qom: Introduce object_class_is_abstract() Andreas Färber
2012-01-29 13:25 ` [Qemu-devel] [PATCH RFC 2/7] qom: Register QOM infrastructure early Andreas Färber
2012-01-29 13:25 ` [Qemu-devel] [PATCH RFC 3/7] qom: Add QOM support to user emulators Andreas Färber
2012-01-29 13:25 ` [Qemu-devel] [PATCH RFC 4/7] qom: Introduce CPU class Andreas Färber
2012-01-30  2:14   ` Anthony Liguori
2012-01-30 11:58     ` Andreas Färber
2012-01-31 10:36     ` Andreas Färber
2012-01-29 13:25 ` [Qemu-devel] [PATCH RFC 5/7] cpu: Introduce cpu_class_foreach() Andreas Färber
2012-01-30  2:16   ` Anthony Liguori
2012-01-30 12:02     ` Andreas Färber
2012-01-29 13:25 ` [Qemu-devel] [PATCH RFC 6/7] target-arm: Introduce QOM CPU and use for it CPUID lookup Andreas Färber
2012-01-30  2:19   ` Anthony Liguori
2012-01-30 12:11     ` Andreas Färber
2012-01-29 13:25 ` [Qemu-devel] [PATCH RFC 7/7] target-arm: Embed CPUARMState in QOM ARMCPU Andreas Färber
2012-01-30  2:22   ` Anthony Liguori
2012-01-30 12:52     ` Andreas Färber
2012-01-30 16:01     ` Andreas Färber
2012-01-29 23:50 ` [Qemu-devel] [PATCH RFC 8/7] target-arm: Use IoC for CPU init Andreas Färber
2012-01-30  2:23   ` Anthony Liguori
2012-01-29 23:50 ` [Qemu-devel] [PATCH RFC 9/7] target-arm: Move CPU feature flags to class Andreas Färber
2012-01-30 19:27   ` 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=1327843531-32403-1-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=paul@codesourcery.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@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).