* [PATCH] accel/hvf: Include missing 'hw/core/cpu.h' header
@ 2025-05-07 20:44 Philippe Mathieu-Daudé
2025-05-07 20:45 ` Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-07 20:44 UTC (permalink / raw)
To: qemu-devel
Cc: Cameron Esfahani, Phil Dennis-Jordan, qemu-arm, Pierrick Bouvier,
Alexander Graf, Roman Bolshakov, Peter Maydell,
Philippe Mathieu-Daudé, Mads Ynddal, Stefan Hajnoczi
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 the hvf-all.c file.
Cc: Mads Ynddal <m.ynddal@samsung.com>
Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
accel/hvf/hvf-all.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c
index 3fc65d6b231..8c387fda24d 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)
{
--
2.47.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] accel/hvf: Include missing 'hw/core/cpu.h' header
2025-05-07 20:44 [PATCH] accel/hvf: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
@ 2025-05-07 20:45 ` Philippe Mathieu-Daudé
2025-05-07 20:46 ` Pierrick Bouvier
2025-05-08 9:27 ` Mads Ynddal
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-07 20:45 UTC (permalink / raw)
To: qemu-devel
Cc: Cameron Esfahani, Phil Dennis-Jordan, qemu-arm, Pierrick Bouvier,
Alexander Graf, Roman Bolshakov, Peter Maydell, Mads Ynddal,
Stefan Hajnoczi
On 7/5/25 22:44, Philippe Mathieu-Daudé wrote:
> 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 the hvf-all.c file.
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'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]
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);
| ^
3 errors generated.
>
> Cc: Mads Ynddal <m.ynddal@samsung.com>
> Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> accel/hvf/hvf-all.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c
> index 3fc65d6b231..8c387fda24d 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)
> {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] accel/hvf: Include missing 'hw/core/cpu.h' header
2025-05-07 20:44 [PATCH] accel/hvf: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
2025-05-07 20:45 ` Philippe Mathieu-Daudé
@ 2025-05-07 20:46 ` Pierrick Bouvier
2025-05-08 9:27 ` Mads Ynddal
2 siblings, 0 replies; 4+ messages in thread
From: Pierrick Bouvier @ 2025-05-07 20:46 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Cameron Esfahani, Phil Dennis-Jordan, qemu-arm, Alexander Graf,
Roman Bolshakov, Peter Maydell, Mads Ynddal, Stefan Hajnoczi
On 5/7/25 1:44 PM, Philippe Mathieu-Daudé wrote:
> 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 the hvf-all.c file.
>
> Cc: Mads Ynddal <m.ynddal@samsung.com>
> Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> accel/hvf/hvf-all.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c
> index 3fc65d6b231..8c387fda24d 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)
> {
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] accel/hvf: Include missing 'hw/core/cpu.h' header
2025-05-07 20:44 [PATCH] accel/hvf: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
2025-05-07 20:45 ` Philippe Mathieu-Daudé
2025-05-07 20:46 ` Pierrick Bouvier
@ 2025-05-08 9:27 ` Mads Ynddal
2 siblings, 0 replies; 4+ messages in thread
From: Mads Ynddal @ 2025-05-08 9:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Cameron Esfahani, Phil Dennis-Jordan, qemu-arm,
Pierrick Bouvier, Alexander Graf, Roman Bolshakov, Peter Maydell,
Mads Ynddal, Stefan Hajnoczi
> 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 the hvf-all.c file.
>
> Cc: Mads Ynddal <m.ynddal@samsung.com>
> Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> accel/hvf/hvf-all.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c
> index 3fc65d6b231..8c387fda24d 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)
> {
Good catch, I should have included that in the initial patch.
Reviewed-by: Mads Ynddal <mads@ynddal.dk <mailto:mads@ynddal.dk>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-08 9:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07 20:44 [PATCH] accel/hvf: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
2025-05-07 20:45 ` Philippe Mathieu-Daudé
2025-05-07 20:46 ` Pierrick Bouvier
2025-05-08 9:27 ` Mads Ynddal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).