Hello Xuetao, This updated series converts the UniCore32 CPU to QOM. In addition to addressing review comments from v1, a new approach for CPU-dependent values has been adopted: We should keep setting of features imperative and can avoid adding new class fields as storage for default values by moving the existing imperative code into new initfn functions.
Patch 1 adds a "UniCore32 CPU guest core (TCG)" section to MAINTAINERS, so that the target-unicore32 author gets notified of patches against his code. Patch 2, based on feedback from Guan Xuetao, changes the license of most target-unicore32 files from GPLv2 to GPLv2+. Anthony had contributed a qemu_malloc() -> g_malloc() substitution that he can't relicense at this time, so leave that as GPLv2 and declare my following patches explicitly as GPLv2+. Patch 3 adds a notice to license any following contributions under GPLv2+ already. Patch 4 embeds CPUUniCore32State into UniCore32CPU. My new cpu-qom.h header can be GPLv2+, but into cpu.c we're moving helper.c code so make it GPLv2 for now. Patch 5 cleans up uc32_cpu_init() function by moving initializations into initfn. Could you test this please and, if happy, provide your Acked-by for patches 1 and 3-5? Available from: git://github.com/afaerber/qemu-cpu.git qom-cpu-unicore32.v2 https://github.com/afaerber/qemu-cpu/commits/qom-cpu-unicore32.v2 Regards, Andreas Cc: Guan Xue-tao <g...@mprc.pku.edu.cn> Cc: Anthony Liguori <anth...@codemonkey.ws> Cc: Peter Maydell <peter.mayd...@linaro.org> v1 -> v2: * Change license notice to match the previous one more closely. * Adopt that license notice for new cpu-qom.h as well. * Add notices to helper.c and cpu.c to license future contributions under GPLv2+. * Adopt Peter's approach of using per-CPU initfn functions for default values. * Squash init code movement together (no new UniCore32CPUClass members needed). * Various naming updates (e.g., ..._type_info). Changes from former repo.or.cz qom-cpu[-wip] branch: * Drop duplicate .instance_init. Andreas Färber (5): MAINTAINERS: Add entry for UniCore32 target-unicore32: Relicense to GPLv2+ target-unicore32: License future contributions under GPLv2+ target-unicore32: QOM'ify CPU target-unicore32: Move CPU-dependent init into initfn MAINTAINERS | 5 ++ Makefile.target | 1 + target-unicore32/cpu-qom.h | 59 ++++++++++++++++++++++++ target-unicore32/cpu.c | 104 ++++++++++++++++++++++++++++++++++++++++++ target-unicore32/cpu.h | 4 +- target-unicore32/helper.c | 65 +++----------------------- target-unicore32/helper.h | 3 +- target-unicore32/op_helper.c | 3 +- target-unicore32/translate.c | 3 +- 9 files changed, 186 insertions(+), 61 deletions(-) create mode 100644 target-unicore32/cpu-qom.h create mode 100644 target-unicore32/cpu.c -- 1.7.7