[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>
- [PATCH v4 07/28] cpu: Introduce SysemuCPUOps structure, (continued)
- [PATCH v4 07/28] cpu: Introduce SysemuCPUOps structure, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 08/28] cpu: Move CPUClass::vmsd to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 09/28] cpu: Move CPUClass::virtio_is_big_endian to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 10/28] cpu: Move CPUClass::get_crash_info to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 11/28] cpu: Move CPUClass::write_elf* to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 12/28] cpu: Move CPUClass::asidx_from_attrs to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 13/28] cpu: Move CPUClass::get_phys_page_debug to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 14/28] cpu: Move CPUClass::get_memory_mapping to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 15/28] cpu: Move CPUClass::get_paging_enabled to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 16/28] cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/cpu.c, Philippe Mathieu-Daudé, 2021/03/03
- RE: [PATCH v4 16/28] cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/cpu.c,
Taylor Simpson <=
- [PATCH v4 17/28] linux-user: Remove dead code, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 18/28] gdbstub: Remove watchpoint dead code in gdbserver_fork(), Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 19/28] target/arm/internals: Fix code style for checkpatch.pl, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 20/28] target/arm: Move code blocks around, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 21/28] target/arm: Refactor some function bodies, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 22/28] target/arm: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 23/28] target/i386: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 25/28] accel/tcg/cpu-exec: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 24/28] target/xtensa: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03