From nobody Tue Feb 10 21:40:06 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1770731598; cv=none; d=zohomail.com; s=zohoarc; b=jmUxTYUP1cDO/DL606ZVW2QLUpgYAXT/yEz77Mvyp7ja6rqV8Id55Cud2lESb+Yv4VERt47LWIB0O0n+YVEQ92Ln5+uwdGFu2KO6Ue1fLtjXNnZMq+7yeYnK90JSF0uCCqN4aiaYr9QAxCQTh0VheDG1oUP7IIHwHXzzUHwyD8k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770731598; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=wHfh+0vLuB+ztlQ1m8l7NlaIrsfeFxV8zm0Rh6FLU2M=; b=KDMnID+CsFBXwNogg9dXeYdXwvxbcGy5ZPYLE2RpFCDKQqjYlfuqCfI5Rp4uGXGl1tgJoAPrJ8jdo7AW1rsA21LZXDfg6D7xUZsu5xZr+QHhf0JlwXX066MsFhJvYWvbHYygVGveKk7eq2F7CCB2BRuJUGDhZXgY4sk9Gp2fl7M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177073159897420.59546663817912; Tue, 10 Feb 2026 05:53:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vpoAD-00022r-1Z; Tue, 10 Feb 2026 08:52:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vpoA7-000207-3Y for qemu-devel@nongnu.org; Tue, 10 Feb 2026 08:52:23 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vpoA5-0006Kf-4n for qemu-devel@nongnu.org; Tue, 10 Feb 2026 08:52:18 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4833115090dso8111935e9.3 for ; Tue, 10 Feb 2026 05:52:16 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4834d5d77f9sm64344875e9.3.2026.02.10.05.52.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Feb 2026 05:52:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770731535; x=1771336335; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=wHfh+0vLuB+ztlQ1m8l7NlaIrsfeFxV8zm0Rh6FLU2M=; b=DLL7ivZ09gxN/yYYEl9fQclU8k799Ck5rkABhvyL4E53yF62ca8ZBvynkGt3xCFKm2 HQvb0Xruf40qaflcPV+7cdGhjrL2tMbHeWrr4fledrYbqlVciVm9AIlr/ZB8dSgT+JbX wUklBfD/jbu07sL0732vlynV9DdBlp0xmMIJgHW2J8NjlaoG9AGizbvv4DELV7wU7TbV CgnGfw5FTxl9CRIXhjKQyBpZyucGf5wZA3yGRIWURdFacxGCp4WDvHHzszF6YzKJdHRk doFvRatZ/5Aod+kJt90QXCVYadTxjqzz1rZxdysouorzX+hpa9MMnzf1Y0l+sXZ0Jhv5 Gvbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770731535; x=1771336335; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=wHfh+0vLuB+ztlQ1m8l7NlaIrsfeFxV8zm0Rh6FLU2M=; b=ZXDujfVQXivIqXhpV+wU17UFdEhbqUKO+pCvOgN+zIvs1918iIzaUT4zHJTCUdR6Ou 8a8jAi1NRCVmTMAnE1OyzmyqFmRR4Q/EvT6ouAUQPKMv1PshUKulV5n/P5gPLOgXHMHq gvCgj2oi9geuTrKdm2kxz+SJnt91UCDkD2qyGRSqZGYb5WrOoTrSiFPmGCMq7/6Zybz8 FaVhX62swKllx54O4ceOjyKoaj/CA+zxd/2lWCx4fj94M6oOl6ApAQmjwl3l/jlADz8N SPWbfnZcQzGPNOsw3v84LBRoEvgtnArnNdk5+bhNTFbycIOpFXWDml7iCLBTB76Rs7zX 0D4A== X-Gm-Message-State: AOJu0YxNfn2++ky9BQTWKv1YM6EhnElx5sDAAXW2aYkqRZjG+Vz0UMXT suAOqn54iTrq3YOWsG2NkgNdvr1/r1n5r+StbLk93zW5aesJLj5zYs/M6FDoFWV56kBCiPwd8Pm 4/lFg X-Gm-Gg: AZuq6aIeQ2rv8Ex3WyMBOCtBLpU70QHPQE8sbaTXV0I0Zw0UBZuMhmxUXmDIBo29wr4 Y1OEghucO3hPqKfbzMeyx0HmvS9HAcQjsZ2aDsnQXkefzwMeDfLMb1SoJCN4dt09MwSochnnaL9 F2ac5Wtm0HqG7NUZckb2TQcmEBjuNs/kEqh/5j0AyuYbqlJGo4C0spMjgn4H7qeedELqYfXRvBN ZQmlCf8Zo9eND/3tO0qq3iwJ5kJPuNGEIYAw32SRynqHRDD9gP8eazWBUgp5bG/w/jXerZCGHSO I7t8YdWGS6ieWssiQs8Vk2ZgX7V6Aa21miiZlv0GjIAWLfY0zoGhjspa1hlz+y9enOwPslWNkD1 yQeVwZOiODoH/PAQdz/PpH4O3UTwvUOLZmTsGuiQfhLzIHfxhspFaz9oHMt+a6UP48K1nm3eN+2 +8aKyDsDlwjLsBVTELixJrm7/HIfO2ivYFdJy6u0pE1XBq+k5kH8MXyvYKzjPAbvUrZUc8XCdUI CushxoB4oHbGuNildF6bCAOjvXjQHs= X-Received: by 2002:a05:600c:3e19:b0:483:5310:dc43 with SMTP id 5b1f17b1804b1-4835310ddedmr22807635e9.32.1770731535264; Tue, 10 Feb 2026 05:52:15 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/26] whpx: Move around files before introducing AArch64 support Date: Tue, 10 Feb 2026 13:51:49 +0000 Message-ID: <20260210135206.229528-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260210135206.229528-1-peter.maydell@linaro.org> References: <20260210135206.229528-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1770731600196154100 From: Mohamed Mediouni Switch to a design where we can share whpx code between x86 and AArch64 whe= n it makes sense to do so. Signed-off-by: Mohamed Mediouni Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Reviewed-by: Akihiko Odaki Signed-off-by: Peter Maydell --- MAINTAINERS | 2 ++ accel/meson.build | 1 + accel/whpx/meson.build | 6 ++++++ {target/i386 =3D> accel}/whpx/whpx-accel-ops.c | 4 ++-- {target/i386/whpx =3D> include/system}/whpx-accel-ops.h | 4 ++-- {target/i386/whpx =3D> include/system}/whpx-internal.h | 6 ++++-- target/i386/whpx/meson.build | 1 - target/i386/whpx/whpx-all.c | 4 ++-- target/i386/whpx/whpx-apic.c | 2 +- 9 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 accel/whpx/meson.build rename {target/i386 =3D> accel}/whpx/whpx-accel-ops.c (97%) rename {target/i386/whpx =3D> include/system}/whpx-accel-ops.h (92%) rename {target/i386/whpx =3D> include/system}/whpx-internal.h (97%) diff --git a/MAINTAINERS b/MAINTAINERS index 29f88d48f3..3a0fe1081a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -564,9 +564,11 @@ WHPX CPUs M: Pedro Barbuda M: Mohamed Mediouni 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 =20 MSHV M: Magnus Kulke diff --git a/accel/meson.build b/accel/meson.build index 983dfd0bd5..289b7420ff 100644 --- a/accel/meson.build +++ b/accel/meson.build @@ -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 index 0000000000..7b3d6f1c1c --- /dev/null +++ b/accel/whpx/meson.build @@ -0,0 +1,6 @@ +whpx_ss =3D ss.source_set() +whpx_ss.add(files( + 'whpx-accel-ops.c', +)) + +specific_ss.add_all(when: 'CONFIG_WHPX', if_true: whpx_ss) diff --git a/target/i386/whpx/whpx-accel-ops.c b/accel/whpx/whpx-accel-ops.c similarity index 97% rename from target/i386/whpx/whpx-accel-ops.c rename to accel/whpx/whpx-accel-ops.c index f75886128d..c84a25c273 100644 --- a/target/i386/whpx/whpx-accel-ops.c +++ b/accel/whpx/whpx-accel-ops.c @@ -16,8 +16,8 @@ #include "qemu/guest-random.h" =20 #include "system/whpx.h" -#include "whpx-internal.h" -#include "whpx-accel-ops.h" +#include "system/whpx-internal.h" +#include "system/whpx-accel-ops.h" =20 static void *whpx_cpu_thread_fn(void *arg) { diff --git a/target/i386/whpx/whpx-accel-ops.h b/include/system/whpx-accel-= ops.h similarity index 92% rename from target/i386/whpx/whpx-accel-ops.h rename to include/system/whpx-accel-ops.h index 54cfc25a14..ed9d4c49f4 100644 --- a/target/i386/whpx/whpx-accel-ops.h +++ b/include/system/whpx-accel-ops.h @@ -7,8 +7,8 @@ * See the COPYING file in the top-level directory. */ =20 -#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 =20 #include "system/cpus.h" =20 diff --git a/target/i386/whpx/whpx-internal.h b/include/system/whpx-interna= l.h similarity index 97% rename from target/i386/whpx/whpx-internal.h rename to include/system/whpx-internal.h index 2dcad1f565..041fa958b4 100644 --- a/target/i386/whpx/whpx-internal.h +++ b/include/system/whpx-internal.h @@ -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 =20 #include #include #include =20 #include "hw/i386/apic.h" +#include "exec/vaddr.h" =20 typedef enum WhpxBreakpointState { WHPX_BP_CLEARED =3D 0, diff --git a/target/i386/whpx/meson.build b/target/i386/whpx/meson.build index 9c54aaad39..c3aaaff9fd 100644 --- a/target/i386/whpx/meson.build +++ b/target/i386/whpx/meson.build @@ -1,5 +1,4 @@ i386_system_ss.add(when: 'CONFIG_WHPX', if_true: files( 'whpx-all.c', 'whpx-apic.c', - 'whpx-accel-ops.c', )) diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index db184e1b0d..cef31fc1a8 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -31,8 +31,8 @@ #include "accel/accel-cpu-target.h" #include =20 -#include "whpx-internal.h" -#include "whpx-accel-ops.h" +#include "system/whpx-internal.h" +#include "system/whpx-accel-ops.h" =20 #include #include diff --git a/target/i386/whpx/whpx-apic.c b/target/i386/whpx/whpx-apic.c index afcb25843b..b934fdcbe1 100644 --- a/target/i386/whpx/whpx-apic.c +++ b/target/i386/whpx/whpx-apic.c @@ -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" =20 struct whpx_lapic_state { struct { --=20 2.43.0