From: Philippe Mathieu-Daudé Date: Wed, 7 May 2025 20:35:37 +0000 (+0200) Subject: accel/hvf: Include missing 'hw/core/cpu.h' header X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3b3ad22c8d2e408511a08562f4277e36dedd5d8;p=thirdparty%2Fqemu.git accel/hvf: Include missing 'hw/core/cpu.h' header Since commit d5bd8d8267e ("hvf: only update sysreg from owning thread") hvf-all.c accesses the run_on_cpu_data type and calls run_on_cpu(), both defined in the "hw/core/cpu.h" header. Fortunately, it is indirectly included via: "system/hvf.h" -> "target/arm/cpu.h" -> "target/arm/cpu-qom.h" -> "hw/core/cpu.h" "system/hvf.h" however doesn't need "target/arm/cpu.h" and we want to remove it there. In order to do that we first need to include it in hvf-all.c, otherwise we get: ../accel/hvf/hvf-all.c:61:54: error: unknown type name 'run_on_cpu_data' 61 | static void do_hvf_update_guest_debug(CPUState *cpu, run_on_cpu_data arg) | ^ ../accel/hvf/hvf-all.c:68:5: error: call to undeclared function 'run_on_cpu' 68 | run_on_cpu(cpu, do_hvf_update_guest_debug, RUN_ON_CPU_NULL); | ^ ../accel/hvf/hvf-all.c:68:48: error: use of undeclared identifier 'RUN_ON_CPU_NULL' 68 | run_on_cpu(cpu, do_hvf_update_guest_debug, RUN_ON_CPU_NULL); | ^ Cc: Mads Ynddal Reported-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Mads Ynddal Message-Id: <20250507204401.45379-1-philmd@linaro.org> --- diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c index 3fc65d6b23..8c387fda24 100644 --- a/accel/hvf/hvf-all.c +++ b/accel/hvf/hvf-all.c @@ -12,6 +12,7 @@ #include "qemu/error-report.h" #include "system/hvf.h" #include "system/hvf_int.h" +#include "hw/core/cpu.h" const char *hvf_return_string(hv_return_t ret) {