qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [RFC 00/12] QOM'ify remaining CPUs


From: Andreas Färber
Subject: [Qemu-ppc] [RFC 00/12] QOM'ify remaining CPUs
Date: Wed, 14 Mar 2012 18:53:24 +0100

Hello,

Based on qom-cpu v4 and object_class_get_list() v2, this series converts
the remaining CPUs to QOM. Their only intersection point is Makefile.target.

TODO: Review LGPLv2.1 text differences (bug in German GNU webpage).
TODO: Check that cpu_model_str is set correctly everywhere.


target-i386:

Eduardo Habkost has already pointed out that it might be better to use
QOM properties for -cpudef in target-i386, so that we use the same code paths
internally as QMP users or machine compatibility code would.

Cc: Eduardo Habkost <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: Jan Kiszka <address@hidden>
Cc: Liu Jinsong <address@hidden>
Cc: Lai Jiangshan <address@hidden>
Cc: Vasilis Liaskovitis <address@hidden>
(Sorry if I forget someone.)


target-ppc:

As already discussed with Alex, I didn't manage to split out the QOM PowerPCCPU
into cpu.c from translate.c #including translate_init.c within a reasonable 
time,
so this becomes an exception in Makefile.target in the follow-up series.

The initfn/uninitfn can be simplified in v2 by putting them in powerpc_cpu_info.

Cc: Alexander Graf <address@hidden>
Cc: qemu-ppc <address@hidden>


target-xtensa:

Xtensa was problematic in that it used declarative definitions for XtensaConfig
whose macros I did not manage to convert to an imperative class_init with
reasonable effort. I therefore resorted to a really ugly memcpy(), better ideas
or follow-up patches welcome!

Cc: Max Filippov <address@hidden>
Cc: Anthony Liguori <address@hidden>


target-mips:

Note that MIPSCPU conflicts with an in-flight FPU reset fix from Khansa and 
Mentor
and with ASE DSP series by Jia Liu.

Cc: Khansa Butt <address@hidden>
Cc: Meador Inge <address@hidden>
Cc: Jia Liu <address@hidden>
Cc: Aurélien Jarno <address@hidden>


Most conversions were pretty straightforward. Pattern was always:
* Add a new cpu-qom.h header to entangle QOM data and cpu.h #defines
* Add a new cpu.c file implement FooCPU, FooCPUClass
* If available, move list of CPU models into FooCPUInfo cpus[] in cpu.c
* Embed CPUFooState as member of FooCPU
* Define ENV_GET_OBJECT(env) macro
* Make cpu-qom.h globally available through cpu.h (for now)
* Move cpu_foo_init() code into foo_cpu_initfn()
* Change cpu_foo_init() to use object_new() with a CPU type
  => Some parts remain that might be moved into initfn in follow-ups.
* Move cpu_foo_reset() code into foo_cpu_reset()
* Let cpu_foo_reset() just call cpu_reset()
* If implemented, change cpu_foo_list_cpu() to get, sort, print GSList of 
FooCPUClass
  => This may change the sometimes arbitrary order in user-visible -cpu ? 
output.
* If any, fix cpu.h vs. cpu-qom.h circular dependency issues through static 
inline helpers

Available at:
http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/qom-cpu-others.v1

Regards,
Andreas


target-alpha:

Cc: Richard Henderson <address@hidden>

target-cris:
target-microblaze:

Cc: Edgar E. Iglesias <address@hidden>
Cc: Peter A. G. Crosthwaite <address@hidden>
Cc: John Williams <address@hidden>

target-lm32:

Cc: Michael Walle <address@hidden>

target-m68k:

Cc: Paul Brook <address@hidden>

target-s390x:

Cc: Alexander Graf <address@hidden>
Cc: Ulrich Hecht <address@hidden>

target-sparc:

Cc: Blue Swirl <address@hidden>

Andreas Färber (12):
  target-s390x: QOM'ify CPU
  target-mips: QOM'ify CPU
  target-m68k: QOM'ify CPU
  target-alpha: QOM'ify CPU
  target-i386: QOM'ify CPU
  target-ppc: QOM'ify CPU
  target-ppc: Prepare finalizer for PowerPCCPU
  target-cris: QOM'ify CPU
  target-lm32: QOM'ify CPU
  target-microblaze: QOM'ify CPU
  target-sparc: QOM'ify CPU
  target-xtensa: QOM'ify CPU

 Makefile.target               |   14 +-
 gdbstub.c                     |   19 +-
 hw/xtensa_pic.c               |   51 +-
 target-alpha/cpu-qom.h        |   74 ++
 target-alpha/cpu.c            |  127 ++++
 target-alpha/cpu.h            |    1 +
 target-alpha/translate.c      |   60 +--
 target-cris/cpu-qom.h         |   73 ++
 target-cris/cpu.c             |  144 ++++
 target-cris/cpu.h             |    2 +
 target-cris/translate.c       |   93 ++--
 target-i386/cpu-qom.h         |   87 +++
 target-i386/cpu.c             | 1598 +++++++++++++++++++++++++++++++++++++++++
 target-i386/cpu.h             |    6 +-
 target-i386/cpuid.c           | 1369 -----------------------------------
 target-i386/helper.c          |  101 +---
 target-lm32/cpu-qom.h         |   77 ++
 target-lm32/cpu.c             |  188 +++++
 target-lm32/cpu.h             |    1 +
 target-lm32/helper.c          |  142 +---
 target-m68k/cpu-qom.h         |   75 ++
 target-m68k/cpu.c             |  161 +++++
 target-m68k/cpu.h             |    1 +
 target-m68k/helper.c          |  158 ++---
 target-microblaze/cpu-qom.h   |   71 ++
 target-microblaze/cpu.c       |  120 +++
 target-microblaze/cpu.h       |    2 +
 target-microblaze/translate.c |   58 +--
 target-mips/cpu-qom.h         |  110 +++
 target-mips/cpu.c             |  806 +++++++++++++++++++++
 target-mips/cpu.h             |    2 +-
 target-mips/translate.c       |  183 ++----
 target-mips/translate_init.c  |  594 ---------------
 target-ppc/cpu-qom.h          |   84 +++
 target-ppc/cpu.h              |   26 +-
 target-ppc/helper.c           |   73 +--
 target-ppc/kvm.c              |   30 +-
 target-ppc/kvm_ppc.h          |    6 -
 target-ppc/translate.c        |    2 +-
 target-ppc/translate_init.c   |  270 ++++++-
 target-s390x/cpu-qom.h        |   71 ++
 target-s390x/cpu.c            |   96 +++
 target-s390x/cpu.h            |    5 +
 target-s390x/helper.c         |   42 +-
 target-sparc/cpu-qom.h        |   95 +++
 target-sparc/cpu.c            |  949 ++++++++++++++++++++++++
 target-sparc/cpu.h            |   29 +-
 target-sparc/cpu_init.c       |  848 ----------------------
 target-sparc/int32_helper.c   |    5 +-
 target-sparc/ldst_helper.c    |   19 +-
 target-sparc/mmu_helper.c     |    4 +-
 target-sparc/translate.c      |    4 +-
 target-sparc/win_helper.c     |    3 +-
 target-xtensa/core-dc232b.c   |    5 +-
 target-xtensa/core-fsf.c      |    5 +-
 target-xtensa/cpu-qom.h       |  186 +++++
 target-xtensa/cpu.c           |   87 +++
 target-xtensa/cpu.h           |  125 +---
 target-xtensa/helper.c        |  151 +++--
 target-xtensa/op_helper.c     |  104 ++-
 target-xtensa/overlay_tool.h  |   28 +-
 target-xtensa/translate.c     |    9 +-
 62 files changed, 6059 insertions(+), 3870 deletions(-)
 create mode 100644 target-alpha/cpu-qom.h
 create mode 100644 target-alpha/cpu.c
 create mode 100644 target-cris/cpu-qom.h
 create mode 100644 target-cris/cpu.c
 create mode 100644 target-i386/cpu-qom.h
 create mode 100644 target-i386/cpu.c
 delete mode 100644 target-i386/cpuid.c
 create mode 100644 target-lm32/cpu-qom.h
 create mode 100644 target-lm32/cpu.c
 create mode 100644 target-m68k/cpu-qom.h
 create mode 100644 target-m68k/cpu.c
 create mode 100644 target-microblaze/cpu-qom.h
 create mode 100644 target-microblaze/cpu.c
 create mode 100644 target-mips/cpu-qom.h
 create mode 100644 target-mips/cpu.c
 delete mode 100644 target-mips/translate_init.c
 create mode 100644 target-ppc/cpu-qom.h
 create mode 100644 target-s390x/cpu-qom.h
 create mode 100644 target-s390x/cpu.c
 create mode 100644 target-sparc/cpu-qom.h
 create mode 100644 target-sparc/cpu.c
 delete mode 100644 target-sparc/cpu_init.c
 create mode 100644 target-xtensa/cpu-qom.h
 create mode 100644 target-xtensa/cpu.c

-- 
1.7.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]