[PATCH 1/5] accel/kvm: Include missing 'exec/cpu-common.h' header

Philippe Mathieu-Daudé posted 5 patches 5 days, 22 hours ago
There is a newer version of this series
[PATCH 1/5] accel/kvm: Include missing 'exec/cpu-common.h' header
Posted by Philippe Mathieu-Daudé 5 days, 22 hours ago
kvm-accel-ops.c uses EXCP_DEBUG, itself defined in
"exec/cpu-common.h". Include it explicitly, otherwise
we get when modifying unrelated headers:

  ../accel/kvm/kvm-accel-ops.c: In function ‘kvm_vcpu_thread_fn’:
  ../accel/kvm/kvm-accel-ops.c:54:22: error: ‘EXCP_DEBUG’ undeclared (first use in this function)
     54 |             if (r == EXCP_DEBUG) {
        |                      ^~~~~~~~~~

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/kvm/kvm-accel-ops.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c
index 8ed6945c2f7..6d9140e549f 100644
--- a/accel/kvm/kvm-accel-ops.c
+++ b/accel/kvm/kvm-accel-ops.c
@@ -16,6 +16,7 @@
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
 #include "qemu/main-loop.h"
+#include "exec/cpu-common.h"
 #include "accel/accel-cpu-ops.h"
 #include "system/kvm.h"
 #include "system/kvm_int.h"
-- 
2.52.0


Re: [PATCH 1/5] accel/kvm: Include missing 'exec/cpu-common.h' header
Posted by Pierrick Bouvier 5 days, 7 hours ago
On 2/24/26 9:12 PM, Philippe Mathieu-Daudé wrote:
> kvm-accel-ops.c uses EXCP_DEBUG, itself defined in
> "exec/cpu-common.h". Include it explicitly, otherwise
> we get when modifying unrelated headers:
> 
>    ../accel/kvm/kvm-accel-ops.c: In function ‘kvm_vcpu_thread_fn’:
>    ../accel/kvm/kvm-accel-ops.c:54:22: error: ‘EXCP_DEBUG’ undeclared (first use in this function)
>       54 |             if (r == EXCP_DEBUG) {
>          |                      ^~~~~~~~~~
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   accel/kvm/kvm-accel-ops.c | 1 +
>   1 file changed, 1 insertion(+)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>