qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC v4 07/14] target/s390x: move sysemu-only code out to cpu-sysemu


From: Cornelia Huck
Subject: Re: [RFC v4 07/14] target/s390x: move sysemu-only code out to cpu-sysemu.c
Date: Wed, 02 Jun 2021 12:05:25 +0200
User-agent: Notmuch/0.32.1 (https://notmuchmail.org)

On Mon, May 24 2021, "Cho, Yu-Chen" <acho@suse.com> wrote:

> Signed-off-by: Claudio Fontana <cfontana@suse.de>
> Signed-off-by: Cho, Yu-Chen <acho@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 :)




reply via email to

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