On Mon, May 24 2021, "Cho, Yu-Chen" <a...@suse.com> wrote: > Signed-off-by: Claudio Fontana <cfont...@suse.de> > Signed-off-by: Cho, Yu-Chen <a...@suse.com> > --- > target/s390x/cpu-sysemu.c | 304 ++++++++++++++++++++++++++++++++++++++ > target/s390x/cpu.c | 282 ++--------------------------------- > target/s390x/meson.build | 1 + > target/s390x/trace-events | 2 +- > 4 files changed, 318 insertions(+), 271 deletions(-) > create mode 100644 target/s390x/cpu-sysemu.c
(...) > +void s390_cpu_class_init_sysemu(CPUClass *cc) > +{ > + S390CPUClass *scc = S390_CPU_CLASS(cc); > + > + scc->load_normal = s390_cpu_load_normal; > + cc->get_phys_page_debug = s390_cpu_get_phys_page_debug; > + cc->vmsd = &vmstate_s390_cpu; > + cc->get_crash_info = s390_cpu_get_crash_info; > + cc->write_elf64_note = s390_cpu_write_elf64_note; > +} I'm wondering whether it would be possible to handle this via a base class and a derived sysemu class? (...) > -#if !defined(CONFIG_USER_ONLY) > -/* S390CPUClass::load_normal() */ > -static void s390_cpu_load_normal(CPUState *s) Getting rid of all that #ifdeffery is nice in any case :)