]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
whpx: Move around files before introducing AArch64 support
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)
Switch to a design where we can share whpx code between x86 and AArch64 when it makes sense to do so.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
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>
MAINTAINERS
accel/meson.build
accel/whpx/meson.build [new file with mode: 0644]
accel/whpx/whpx-accel-ops.c [moved from target/i386/whpx/whpx-accel-ops.c with 97% similarity]
include/system/whpx-accel-ops.h [moved from target/i386/whpx/whpx-accel-ops.h with 92% similarity]
include/system/whpx-internal.h [moved from target/i386/whpx/whpx-internal.h with 97% similarity]
target/i386/whpx/meson.build
target/i386/whpx/whpx-all.c
target/i386/whpx/whpx-apic.c

index 29f88d48f3072aa182908bab667d3a108ffc246d..3a0fe1081af81c134a602f019fd8b17f1ed03fe2 100644 (file)
@@ -564,9 +564,11 @@ WHPX CPUs
 M: Pedro Barbuda <pbarbuda@microsoft.com>
 M: Mohamed Mediouni <mohamed@unpredictable.fr>
 S: Supported
+F: accel/whpx/
 F: target/i386/whpx/
 F: accel/stubs/whpx-stub.c
 F: include/system/whpx.h
+F: include/system/whpx-accel-ops.h
 
 MSHV
 M: Magnus Kulke <magnus.kulke@linux.microsoft.com>
index 983dfd0bd55e02841aa6c5d4b26a4cc4113c8f49..289b7420ffaf93a82f717a4a17ce6042d98f1d50 100644 (file)
@@ -6,6 +6,7 @@ user_ss.add(files('accel-user.c'))
 subdir('tcg')
 if have_system
   subdir('hvf')
+  subdir('whpx')
   subdir('qtest')
   subdir('kvm')
   subdir('xen')
diff --git a/accel/whpx/meson.build b/accel/whpx/meson.build
new file mode 100644 (file)
index 0000000..7b3d6f1
--- /dev/null
@@ -0,0 +1,6 @@
+whpx_ss = ss.source_set()
+whpx_ss.add(files(
+  'whpx-accel-ops.c',
+))
+
+specific_ss.add_all(when: 'CONFIG_WHPX', if_true: whpx_ss)
similarity index 97%
rename from target/i386/whpx/whpx-accel-ops.c
rename to accel/whpx/whpx-accel-ops.c
index f75886128d0d35f057593eb0ca11224751d5976b..c84a25c2731140694ce5ea460da1b3597d7dc9ba 100644 (file)
@@ -16,8 +16,8 @@
 #include "qemu/guest-random.h"
 
 #include "system/whpx.h"
-#include "whpx-internal.h"
-#include "whpx-accel-ops.h"
+#include "system/whpx-internal.h"
+#include "system/whpx-accel-ops.h"
 
 static void *whpx_cpu_thread_fn(void *arg)
 {
similarity index 92%
rename from target/i386/whpx/whpx-accel-ops.h
rename to include/system/whpx-accel-ops.h
index 54cfc25a14717b20cd9d5e7819721fdc5753d683..ed9d4c49f4d174cfdc409936719ae278248f9444 100644 (file)
@@ -7,8 +7,8 @@
  * See the COPYING file in the top-level directory.
  */
 
-#ifndef TARGET_I386_WHPX_ACCEL_OPS_H
-#define TARGET_I386_WHPX_ACCEL_OPS_H
+#ifndef SYSTEM_WHPX_ACCEL_OPS_H
+#define SYSTEM_WHPX_ACCEL_OPS_H
 
 #include "system/cpus.h"
 
similarity index 97%
rename from target/i386/whpx/whpx-internal.h
rename to include/system/whpx-internal.h
index 2dcad1f56502c670ed49d0231d08d563c5c4e1f9..041fa958b4111bacf8b04a25778bf80eececded6 100644 (file)
@@ -1,11 +1,13 @@
-#ifndef TARGET_I386_WHPX_INTERNAL_H
-#define TARGET_I386_WHPX_INTERNAL_H
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+#ifndef SYSTEM_WHPX_INTERNAL_H
+#define SYSTEM_WHPX_INTERNAL_H
 
 #include <windows.h>
 #include <winhvplatform.h>
 #include <winhvemulation.h>
 
 #include "hw/i386/apic.h"
+#include "exec/vaddr.h"
 
 typedef enum WhpxBreakpointState {
     WHPX_BP_CLEARED = 0,
index 9c54aaad392267ca6b2d249a78a3df3962d536a7..c3aaaff9fd18f8ce4189bcdfc2697b2c314f1d53 100644 (file)
@@ -1,5 +1,4 @@
 i386_system_ss.add(when: 'CONFIG_WHPX', if_true: files(
   'whpx-all.c',
   'whpx-apic.c',
-  'whpx-accel-ops.c',
 ))
index db184e1b0d0a01f82c6e67f6f5011da8f06ae1ce..cef31fc1a829d177cc73eddead018d02df6c88e9 100644 (file)
@@ -31,8 +31,8 @@
 #include "accel/accel-cpu-target.h"
 #include <winerror.h>
 
-#include "whpx-internal.h"
-#include "whpx-accel-ops.h"
+#include "system/whpx-internal.h"
+#include "system/whpx-accel-ops.h"
 
 #include <winhvplatform.h>
 #include <winhvemulation.h>
index afcb25843b515486f154e7959edeaa07e160ee0b..b934fdcbe1993b3bc4fce3c741b1a76223522363 100644 (file)
@@ -18,7 +18,7 @@
 #include "hw/pci/msi.h"
 #include "system/hw_accel.h"
 #include "system/whpx.h"
-#include "whpx-internal.h"
+#include "system/whpx-internal.h"
 
 struct whpx_lapic_state {
     struct {