> -----Original Message----- > From: Philippe Mathieu-Daudé <philippe.mathieu.da...@gmail.com> On > Behalf Of Philippe Mathieu-Daudé > Sent: Wednesday, March 3, 2021 3:47 PM > To: qemu-devel@nongnu.org > Cc: Claudio Fontana <cfont...@suse.de>; qemu-...@nongnu.org; Peter > Maydell <peter.mayd...@linaro.org>; Paolo Bonzini > <pbonz...@redhat.com>; Richard Henderson > <richard.hender...@linaro.org>; qemu-s3...@nongnu.org; Thomas Huth > <th...@redhat.com>; qemu-...@nongnu.org; Laurent Vivier > <laur...@vivier.eu>; Cornelia Huck <coh...@redhat.com>; Alex Bennée > <alex.ben...@linaro.org>; Philippe Mathieu-Daudé <f4...@amsat.org>; > Eduardo Habkost <ehabk...@redhat.com>; Marcel Apfelbaum > <marcel.apfelb...@gmail.com>; Michael Rolnik <mrol...@gmail.com>; > Sarah Harris <s.e.har...@kent.ac.uk>; Edgar E. Iglesias > <edgar.igles...@gmail.com>; Taylor Simpson <tsimp...@quicinc.com>; > Michael Walle <mich...@walle.cc>; Aurelien Jarno <aurel...@aurel32.net>; > Jiaxun Yang <jiaxun.y...@flygoat.com>; Aleksandar Rikalo > <aleksandar.rik...@syrmia.com>; Anthony Green > <gr...@moxielogic.com>; Chris Wulff <crwu...@gmail.com>; Marek Vasut > <ma...@denx.de>; Stafford Horne <sho...@gmail.com>; David Gibson > <da...@gibson.dropbear.id.au>; Greg Kurz <gr...@kaod.org>; Palmer > Dabbelt <pal...@dabbelt.com>; Alistair Francis > <alistair.fran...@wdc.com>; Sagar Karandikar <sag...@eecs.berkeley.edu>; > Bastian Koppelmann <kbast...@mail.uni-paderborn.de>; Yoshinori Sato > <ys...@users.sourceforge.jp>; David Hildenbrand <da...@redhat.com>; > Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk>; Artyom Tarasenko > <atar4q...@gmail.com>; Guan Xuetao <g...@mprc.pku.edu.cn>; Max > Filippov <jcmvb...@gmail.com>; open list:RISC-V TCG CPUs <qemu- > ri...@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 <cfont...@suse.de> > Signed-off-by: Philippe Mathieu-Daudé <f4...@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 <tsimp...@quicinc.com>