On 2025/11/21 19:02, Mohamed Mediouni wrote:
Fix buildability on newer Qemu.

Can you give some more explanation?


Signed-off-by: Mohamed Mediouni <[email protected]>
---
  accel/stubs/whpx-stub.c        |  1 +
  accel/whpx/whpx-common.c       | 10 +---------
  include/system/whpx-internal.h |  1 -
  include/system/whpx.h          |  3 ++-
  4 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/accel/stubs/whpx-stub.c b/accel/stubs/whpx-stub.c
index c564c89fd0..4529dc4f78 100644
--- a/accel/stubs/whpx-stub.c
+++ b/accel/stubs/whpx-stub.c
@@ -10,3 +10,4 @@
  #include "system/whpx.h"
bool whpx_allowed;
+bool whpx_irqchip_in_kernel;
diff --git a/accel/whpx/whpx-common.c b/accel/whpx/whpx-common.c
index 18d93225c1..4dabe3a032 100644
--- a/accel/whpx/whpx-common.c
+++ b/accel/whpx/whpx-common.c
@@ -39,6 +39,7 @@
  #include <winhvplatformdefs.h>
bool whpx_allowed;
+bool whpx_irqchip_in_kernel;
  static bool whp_dispatch_initialized;
  static HMODULE hWinHvPlatform;
  #ifdef __x86_64__
@@ -492,15 +493,6 @@ static const TypeInfo whpx_cpu_accel_type = {
      .abstract = true,
  };
-/*
- * Partition support
- */
-
-bool whpx_irqchip_in_kernel(void)
-{
-    return whpx_global.kernel_irqchip;
-}
-
  static void whpx_accel_class_init(ObjectClass *oc, const void *data)
  {
      AccelClass *ac = ACCEL_CLASS(oc);
diff --git a/include/system/whpx-internal.h b/include/system/whpx-internal.h
index 81c0c1819f..b1706a2749 100644
--- a/include/system/whpx-internal.h
+++ b/include/system/whpx-internal.h
@@ -44,7 +44,6 @@ struct whpx_state {
bool kernel_irqchip_allowed;
      bool kernel_irqchip_required;
-    bool kernel_irqchip;
  };
extern struct whpx_state whpx_global;
diff --git a/include/system/whpx.h b/include/system/whpx.h
index 98fe045ba1..4217a27e91 100644
--- a/include/system/whpx.h
+++ b/include/system/whpx.h
@@ -25,8 +25,9 @@
#ifdef CONFIG_WHPX_IS_POSSIBLE
  extern bool whpx_allowed;
+extern bool whpx_irqchip_in_kernel;
  #define whpx_enabled() (whpx_allowed)
-bool whpx_irqchip_in_kernel(void);
+#define whpx_irqchip_in_kernel() (whpx_irqchip_in_kernel)
  #else /* !CONFIG_WHPX_IS_POSSIBLE */
  #define whpx_enabled() 0
  #define whpx_irqchip_in_kernel() (0)


Reply via email to