qemu-s390x
[Top][All Lists]
Advanced

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

RE: [PATCH v4 16/28] cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/


From: Taylor Simpson
Subject: RE: [PATCH v4 16/28] cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/cpu.c
Date: Wed, 3 Mar 2021 22:27:28 +0000


> -----Original Message-----
> From: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> On
> Behalf Of Philippe Mathieu-Daudé
> Sent: Wednesday, March 3, 2021 3:47 PM
> To: qemu-devel@nongnu.org
> Cc: Claudio Fontana <cfontana@suse.de>; qemu-arm@nongnu.org; Peter
> Maydell <peter.maydell@linaro.org>; Paolo Bonzini
> <pbonzini@redhat.com>; Richard Henderson
> <richard.henderson@linaro.org>; qemu-s390x@nongnu.org; Thomas Huth
> <thuth@redhat.com>; qemu-ppc@nongnu.org; Laurent Vivier
> <laurent@vivier.eu>; Cornelia Huck <cohuck@redhat.com>; Alex Bennée
> <alex.bennee@linaro.org>; Philippe Mathieu-Daudé <f4bug@amsat.org>;
> Eduardo Habkost <ehabkost@redhat.com>; Marcel Apfelbaum
> <marcel.apfelbaum@gmail.com>; Michael Rolnik <mrolnik@gmail.com>;
> Sarah Harris <S.E.Harris@kent.ac.uk>; Edgar E. Iglesias
> <edgar.iglesias@gmail.com>; Taylor Simpson <tsimpson@quicinc.com>;
> Michael Walle <michael@walle.cc>; Aurelien Jarno <aurelien@aurel32.net>;
> Jiaxun Yang <jiaxun.yang@flygoat.com>; Aleksandar Rikalo
> <aleksandar.rikalo@syrmia.com>; Anthony Green
> <green@moxielogic.com>; Chris Wulff <crwulff@gmail.com>; Marek Vasut
> <marex@denx.de>; Stafford Horne <shorne@gmail.com>; David Gibson
> <david@gibson.dropbear.id.au>; Greg Kurz <groug@kaod.org>; Palmer
> Dabbelt <palmer@dabbelt.com>; Alistair Francis
> <Alistair.Francis@wdc.com>; Sagar Karandikar <sagark@eecs.berkeley.edu>;
> Bastian Koppelmann <kbastian@mail.uni-paderborn.de>; Yoshinori Sato
> <ysato@users.sourceforge.jp>; David Hildenbrand <david@redhat.com>;
> Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>; Artyom Tarasenko
> <atar4qemu@gmail.com>; Guan Xuetao <gxt@mprc.pku.edu.cn>; Max
> Filippov <jcmvbkbc@gmail.com>; open list:RISC-V TCG CPUs <qemu-
> riscv@nongnu.org>
> Subject: [PATCH v4 16/28] cpu: Restrict "hw/core/sysemu-cpu-ops.h" to
> target/cpu.c
>
> Somehow similar to commit 78271684719 ("cpu: tcg_ops: move to
> tcg-cpu-ops.h, keep a pointer in CPUClass"):
>
> We cannot in principle make the SysEmu Operations field definitions
> conditional on CONFIG_SOFTMMU in code that is included by both
> common_ss and specific_ss modules.
>
> Therefore, what we can do safely to restrict the SysEmu fields to
> system emulation builds, is to move all sysemu operations into a
> separate header file, which is only included by system-specific code.
>
> This leaves just a NULL pointer in the cpu.h for the user-mode builds.
>
> Inspired-by: Claudio Fontana <cfontana@suse.de>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h
> index e04eac591c8..2a878e77f08 100644
> --- a/target/hexagon/cpu.h
> +++ b/target/hexagon/cpu.h
> @@ -26,6 +26,9 @@ typedef struct CPUHexagonState CPUHexagonState;
>  #include "qemu-common.h"
>  #include "exec/cpu-defs.h"
>  #include "hex_regs.h"
> +#ifndef CONFIG_USER_ONLY
> +#include "hw/core/sysemu-cpu-ops.h"
> +#endif

Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>


reply via email to

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