qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH RFC 0/7] Introduce QOM CPU and use for target-arm
@ 2012-01-29 13:25 Andreas Färber
  2012-01-29 13:25 ` [Qemu-devel] [PATCH 1/7][RESEND] qom: Introduce object_class_is_abstract() Andreas Färber
                   ` (8 more replies)
  0 siblings, 9 replies; 22+ messages in thread
From: Andreas Färber @ 2012-01-29 13:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Anthony Liguori, Andreas Färber, Paul Brook

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2012-01-31 10:39 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-29 13:25 [Qemu-devel] [PATCH RFC 0/7] Introduce QOM CPU and use for target-arm Andreas Färber
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

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).