]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
whpx: common: add WHPX_INTERCEPT_DEBUG_TRAPS define
authorMohamed Mediouni <mohamed@unpredictable.fr>
Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 10 Feb 2026 11:34:49 +0000 (11:34 +0000)
As of why: WHPX on arm64 doesn't have debug trap support as of today.

Keep the exception bitmap interface for now - despite that being entirely unavailable on arm64 too.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
accel/whpx/whpx-common.c
include/system/whpx-common.h

index c58344cb619c8b9a005de6a269ca9d03fa71f229..c0610815d9da76ba0c602191098e8318f1a643e1 100644 (file)
@@ -119,7 +119,7 @@ int whpx_first_vcpu_starting(CPUState *cpu)
          * have one or more breakpoints enabled. Both require intercepting
          * the WHvX64ExceptionTypeBreakpointTrap exception.
          */
-        exception_mask = 1UL << WHvX64ExceptionTypeDebugTrapOrFault;
+        exception_mask = 1UL << WHPX_INTERCEPT_DEBUG_TRAPS;
     } else {
         /* Let the guest handle all exceptions. */
         exception_mask = 0;
index 8f171d13971d3e6dbace86283463dd4fc73712ed..b86fe9db6eba34f02279db48eb671a0c0195e159 100644 (file)
@@ -20,4 +20,7 @@ int whpx_first_vcpu_starting(CPUState *cpu);
 int whpx_last_vcpu_stopping(CPUState *cpu);
 void whpx_memory_init(void);
 struct whpx_breakpoint *whpx_lookup_breakpoint_by_addr(uint64_t address);
+
+/* On x64: same as WHvX64ExceptionTypeDebugTrapOrFault */
+#define WHPX_INTERCEPT_DEBUG_TRAPS 1
 #endif