Hello, Based on qom-cpu v4 and object_class_get_list() v2, this series converts the SuperH CPU to QOM.
The SH7750 SoC code invited to do some cleanups, making use of the SuperHCPU, so I've QOM'ified the SoC and added the CPU as a link<SuperHCPU> for now. I'm not so happy about the link construct, so it may need to be redone as a SysBus device with qdev properties - long-term I'd like to have a "system-on-chip" type derived from TYPE_DEVICE. Deriving it from TYPE_SYS_BUS_DEVICE might make for a better v2. Patch 1 does the actual CPU QOM'ification, introducing SuperHCPU. Patch 2 is a bugfix noticed during QOM'ification. Patches 3-11 start using QOM SuperHCPU in place of CPUSH4State. Patch 12 QOM'ifies the SH7750 SoC. Optional. Available at: http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/qom-cpu-sh4.v1 Regards, Andreas Cc: Aurélien Jarno <aurel...@aurel32.net> Andreas Färber (12): target-sh4: QOM'ify CPU target-sh4: Do not reset features on reset hw/sh7750: Use SuperHCPU target-sh4: Make cpu_sh4_invalidate_tlb() take SuperHCPU target-sh4: Make increment_urc() take SuperHCPU target-sh4: Make find_*tlb_entry() take SuperHCPU target-sh4: Make cpu_sh4_{read,write}_mmaped_{i,u}tlb_addr() take CPU target-sh4: Make get_{physical,mmu}_address() take SuperHCPU target-sh4: Make copy_utlb_entry_itlb() take SuperHCPU target-sh4: Make update_itlb_use() take SuperHCPU target-sh4: Make itlb_replacement() use SuperHCPU hw/sh7750: QOM'ify SH7750 SoC Makefile.target | 1 + hw/r2d.c | 9 ++- hw/sh.h | 6 +- hw/sh7750.c | 95 ++++++++++++++++--------- hw/shix.c | 8 ++- target-sh4/cpu-qom.h | 81 +++++++++++++++++++++ target-sh4/cpu.c | 162 +++++++++++++++++++++++++++++++++++++++++ target-sh4/cpu.h | 24 +++--- target-sh4/helper.c | 188 +++++++++++++++++++++++++----------------------- target-sh4/translate.c | 122 ++++++++++--------------------- 10 files changed, 474 insertions(+), 222 deletions(-) create mode 100644 target-sh4/cpu-qom.h create mode 100644 target-sh4/cpu.c -- 1.7.7