Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3A7CC87FD1 for ; Mon, 4 Aug 2025 15:49:24 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uixQe-0007Se-VX; Mon, 04 Aug 2025 11:48:48 -0400 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 1uiw6J-0004yo-V8 for qemu-devel@nongnu.org; Mon, 04 Aug 2025 10:23:44 -0400 Received: from p-east3-cluster4-host2-snip4-6.eps.apple.com ([57.103.84.19] helo=outbound.qs.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uiw6G-0000Di-DT for qemu-devel@nongnu.org; Mon, 04 Aug 2025 10:23:43 -0400 Received: from outbound.qs.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-east-2d-10-percent-0 (Postfix) with ESMTPS id 72835180136D; Mon, 4 Aug 2025 14:23:32 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; bh=c2KzyefYlIkPKn33KPaq2u9gC0I4qqQf4wCXBWVT/Ss=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type:x-icloud-hme; b=cEAtlzX/Rp9Nwiw6L11uIPzcs/ad771AIqAUT7KYHciMBuZSstC/b/jI0c6WSLYQHCSrrqFb3DGi/51ZTPcep0WVIcMyxLsi2Og8lpafFVOIaVaoIT2sZqGyE42P5tKJrJBi0wgVL9i3HXMqaTW6vHVPQbp8X8VUqmuavHKUV6St0uy9ov+Ki4/1jLYK5m1Ba1MaQLq1Z5gZo7p3Pq75INfQrUvoyW3B8vbBedeLRrxPD+Nd+VpfUnmrrGCoY4/ziBeSZEhYcAQRm+Dh9C6kfuWFKHx16MfFvxbF2zc4j1DROCzq6ZnQg6tqQfs1kHz0ueNMUnoyiIgZLya55Ike8Q== X-Client-IP: 46.189.47.18 Received: from localhost.localdomain (qs-asmtp-me-k8s.p00.prod.me.com [17.57.155.37]) by p00-icloudmta-asmtp-us-east-2d-10-percent-0 (Postfix) with ESMTPSA id 8A6AC180134F; Mon, 4 Aug 2025 14:23:29 +0000 (UTC) From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Shannon Zhao , Ani Sinha , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Phil Dennis-Jordan , Roman Bolshakov , Igor Mammedov , Eduardo Habkost , Mohamed Mediouni , Mads Ynddal , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Sunil Muthuswamy , Zhao Liu , "Michael S. Tsirkin" , Alexander Graf , qemu-arm@nongnu.org, Peter Maydell , Marcel Apfelbaum , Yanan Wang , Richard Henderson , Cameron Esfahani , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v4 00/17] WHPX support for Arm Date: Mon, 4 Aug 2025 16:23:09 +0200 Message-Id: <20250804142326.72947-1-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.39.5 (Apple Git-154) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: i2jIDTJmehourJ279wXsZaXgzlGo7vHz X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODA0MDA4MCBTYWx0ZWRfXwRcKNoXK3h9h pjnQ/mDclnHpOPdYAAYEaOM2yd0FlN7yu7uhtuZv3SwKCwfwlxgqfTcjzYaK4LMk/o1vv1aovfX pVELBv9lN6nnX7ctNHHFndYZQZjC7iZn+ALdOSAOA/ynP3aGVsUQ0wMaP1Y3XtIh9M33DtQNDg3 nVOl9UOkGZ0yo07E3TU3EqUTd113HoSPlFh1d9gZIhxnSm1pBWx+rpgfN7TP4t8FJ4Vkq+IAajW Z683d2cjLN8gju8vI4UE1GJN3Q/T1eg27b3vp6+NtLp/2GT81AbzTiETt/9rlxG+S7drsErnQ= X-Proofpoint-ORIG-GUID: i2jIDTJmehourJ279wXsZaXgzlGo7vHz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-04_06,2025-08-04_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 malwarescore=0 mlxscore=0 clxscore=1030 mlxlogscore=999 adultscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.22.0-2506270000 definitions=main-2508040080 Received-SPF: pass client-ip=57.103.84.19; envelope-from=mohamed@unpredictable.fr; helo=outbound.qs.icloud.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_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Link to branch: https://github.com/mediouni-m/qemu whpx (tag for this submission: whpx-v3) Missing features: - PSCI state sync with Hyper-V: notably breaks reboots when multiple cores are enabled - Interrupt controller save-restore - Debug register sync - SVE register sync - Adding a migration blocker because of the items above. Note: "accel/system: Introduce hwaccel_enabled() helper" taken from the mailing list, added here as part of this series to make it compilable as a whole. "hw/arm: virt: add GICv2m for the case when ITS is not available" present in both the HVF vGIC and this series. Updates since v3: - Disabling SVE on WHPX - Taking into account review comments incl: - fixing x86 support - reduce the amount of __x86_64__ checks in common code to the minimum (winhvemulation) which can be reduced even further down the road. - generalize get_physical_address_range into something common between hvf and whpx Updates since v2: - Fixed up a rebase screwup for whpx-internal.h - Fixed ID_AA64ISAR1_EL1 and ID_AA64ISAR2_EL1 feature probe for -cpu host - Switched to ID_AA64PFR1_EL1/ID_AA64DFR0_EL1 instead of their non-AA64 variant Updates since v1: - Shutdowns and reboots - MPIDR_EL1 register sync - Fixing GICD_TYPER_LPIS value - IPA size clamping - -cpu host now implemented Mohamed Mediouni (16): hw/arm: virt: add GICv2m for the case when ITS is not available whpx: Move around files before introducing AArch64 support whpx: reshuffle common code whpx: ifdef out winhvemulation on non-x86_64 whpx: common: add WHPX_INTERCEPT_DEBUG_TRAPS define hw, target, accel: whpx: change apic_in_platform to kernel_irqchip whpx: interrupt controller support whpx: add arm64 support whpx: copy over memory management logic from hvf target/arm: cpu: mark WHPX as supporting PSCI 1.1 hw/arm: virt: cleanly fail on attempt to use the platform vGIC together with ITS whpx: arm64: clamp down IPA size hw/arm, accel/hvf, whpx: unify get_physical_address_range between WHPX and HVF whpx: arm64: implement -cpu host target/arm: whpx: instantiate GIC early MAINTAINERS: Add myself as a maintainer for WHPX Philippe Mathieu-Daudé (1): accel/system: Introduce hwaccel_enabled() helper MAINTAINERS | 9 +- accel/hvf/hvf-all.c | 7 +- accel/meson.build | 1 + accel/whpx/meson.build | 7 + {target/i386 => accel}/whpx/whpx-accel-ops.c | 6 +- accel/whpx/whpx-common.c | 666 +++++++++++ hw/arm/virt-acpi-build.c | 4 +- hw/arm/virt.c | 34 +- hw/i386/x86-cpu.c | 4 +- hw/intc/arm_gicv3_common.c | 3 + hw/intc/arm_gicv3_whpx.c | 261 +++++ hw/intc/meson.build | 1 + include/hw/arm/virt.h | 2 + include/hw/boards.h | 3 +- include/hw/intc/arm_gicv3_common.h | 3 + include/system/hvf_int.h | 2 + include/system/hw_accel.h | 13 + .../whpx => include/system}/whpx-accel-ops.h | 4 +- include/system/whpx-all.h | 20 + include/system/whpx-common.h | 26 + .../whpx => include/system}/whpx-internal.h | 14 +- include/system/whpx.h | 4 +- meson.build | 21 +- target/arm/cpu.c | 3 +- target/arm/cpu64.c | 19 +- target/arm/hvf-stub.c | 20 - target/arm/hvf/hvf.c | 6 +- target/arm/hvf_arm.h | 3 - target/arm/meson.build | 2 +- target/arm/whpx/meson.build | 5 + target/arm/whpx/whpx-all.c | 1021 +++++++++++++++++ target/arm/whpx/whpx-stub.c | 15 + target/arm/whpx_arm.h | 17 + target/i386/cpu-apic.c | 2 +- target/i386/hvf/hvf.c | 10 + target/i386/whpx/meson.build | 1 - target/i386/whpx/whpx-all.c | 569 +-------- target/i386/whpx/whpx-apic.c | 2 +- 38 files changed, 2191 insertions(+), 619 deletions(-) create mode 100644 accel/whpx/meson.build rename {target/i386 => accel}/whpx/whpx-accel-ops.c (96%) create mode 100644 accel/whpx/whpx-common.c create mode 100644 hw/intc/arm_gicv3_whpx.c rename {target/i386/whpx => include/system}/whpx-accel-ops.h (92%) create mode 100644 include/system/whpx-all.h create mode 100644 include/system/whpx-common.h rename {target/i386/whpx => include/system}/whpx-internal.h (96%) delete mode 100644 target/arm/hvf-stub.c create mode 100644 target/arm/whpx/meson.build create mode 100644 target/arm/whpx/whpx-all.c create mode 100644 target/arm/whpx/whpx-stub.c create mode 100644 target/arm/whpx_arm.h -- 2.39.5 (Apple Git-154)