From nobody Sat Apr 11 23:02:53 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=reject dis=none) header.from=unpredictable.fr ARC-Seal: i=1; a=rsa-sha256; t=1772538237; cv=none; d=zohomail.com; s=zohoarc; b=ChW0Pr5FC6QLjLxDbimCJ5BgTqAKByntlBb5rpsvaxo483Wg+IJTvkkbZEXMTYeTXCFPqsEQCogd7xdHUqLxT3MxXemfhBJN0eLJBfkNibRxQi6iVukjB0Zk2ikAod1NxyHmttQ8u205CrcA9tfcOe5/4CjcOPA8vBMMJl+6yew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772538237; h=Content-Transfer-Encoding:Cc:Cc: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; bh=mLmxlRPFcwMxrG9myQtY85BdAdnRcI/En8EyLObKCOE=; b=D6tObGHs3eNYpPDyuIeoz106S8fx7lDTV9XGtDWTVEGdD+4DMHRjUoULd45+2l7s3XtUV3X6Nc2Uv0MZvmrVz/jvbuancyQSVEunh7XrOT8f+WIQxv3a6iMA9lVABpKYQ212N3ZzOPUSW/FaWJGR5//2nW/y5Fu0WJW78YSyzZk= 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=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772538237564448.2250045925821; Tue, 3 Mar 2026 03:43:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxO8l-0005EJ-9B; Tue, 03 Mar 2026 06:42:15 -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 1vxO8R-00050l-L5 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 06:41:58 -0500 Received: from p-west1-cluster6-host3-snip4-10.eps.apple.com ([57.103.67.53] helo=outbound.pv.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxO8N-0001Sx-K1 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 06:41:53 -0500 Received: from outbound.pv.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-west-1a-20-percent-3 (Postfix) with ESMTPS id 597BD18001AF; Tue, 3 Mar 2026 11:41:43 +0000 (UTC) Received: from localhost.localdomain (unknown [17.56.9.36]) by p00-icloudmta-asmtp-us-west-1a-20-percent-3 (Postfix) with ESMTPSA id C2186180018D; Tue, 3 Mar 2026 11:41:40 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772538105; x=1775130105; bh=mLmxlRPFcwMxrG9myQtY85BdAdnRcI/En8EyLObKCOE=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=bRrtO0yxF0zqrSM+j/OxOqcFDTpUvIe2ewUZ/jDRcQDow8NN86NKyNazdv9yKsfdhh93R/QAsuQU5BZnNuE0DTJvDx4xWNzrkmZYRSMEXjPxC9Ek8fbRg/HC2S6hYH8hLtgtN5AHbNKHK0gaxc9+DVNxDAIayZ/yog5mdM8L4i0vs0azBuB3o7piaE94lmQXckd6mZC5K/PQD6O3TPkimn8y9GZBL63SX5EdTd/RDg4xEg7Ebpz2Xpin6reYsMwnxUWXTkvkS9NPgVo8MrSbKVRrxb8Kt9+xT+1sYNsPDyH5msRYEB1x/SA6drcPjsz0T6I35mAaybyA1UwctjHO6w== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , Pedro Barbuda , qemu-arm@nongnu.org, Wei Liu , Phil Dennis-Jordan , Roman Bolshakov , Cameron Esfahani , Peter Maydell Subject: [PATCH v2 1/6] whpx: i386: do not enable nested virt when kernel-irqchip=off Date: Tue, 3 Mar 2026 12:41:30 +0100 Message-ID: <20260303114135.15390-2-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303114135.15390-1-mohamed@unpredictable.fr> References: <20260303114135.15390-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDA5MSBTYWx0ZWRfXzN7DCCl7iJc2 L/udpOQnvnEIIsmXqtK0wfzKXnFuJQ1YDfwEiVYtHf1LpU42IVy5jI+m26y6IyQTJD+joPBOTEi LdOU5CznzjCnW3DBfZlYWa7fMcRGmzHCDG9BggjdEOfdDziuY5jEFidn94rEDgDz/EpfaHo5SEq PZNaGQ7dh5VcXEU5fVj6UzUpAT9Je+PVAUTHhdaUQWk25cIDTGdYeriRANh7cygOhFebI4AhQYg 9g2HddYWH5JcxKHciTlTyfxeTjPdO/gG+b+x09Pp628tFS9kOtKXlkxjFpw98pT1ZfuTCr4jNUC Xv/qjrlTZboW4Mzqp+VQJmL80bJ5QUsCbzH5qvvXs+lOFV6ZNyZWd+DcyWIamk= X-Proofpoint-ORIG-GUID: IxBslaViKlEyzMM3C9kKMzsyxd8QfLSY X-Authority-Info-Out: v=2.4 cv=XbKEDY55 c=1 sm=1 tr=0 ts=69a6c8f8 cx=c_apl:c_pps:t_out a=azHRBMxVc17uSn+fyuI/eg==:117 a=azHRBMxVc17uSn+fyuI/eg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=eKpLbWQDCUPTAuIwU-0A:9 X-Proofpoint-GUID: IxBslaViKlEyzMM3C9kKMzsyxd8QfLSY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-02_05,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 clxscore=1030 suspectscore=0 bulkscore=0 malwarescore=0 mlxlogscore=830 phishscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030091 X-JNJ: AAAAAAABz/yotMZviZkIPitPqt+/rwxZzumJ5SQQTwzPDzY3a+Z+Q4QlZDznI1IE5qQ97ev/erctLG/Ma5/IWdTw70hblg3pjfhpp8V/IyjQjVlB0lWDHg8LmF05e7ymZu2mOpzpUNmtNqLlDh0k45i+qxsBXENyRXDcIyISOEq5AHHQCFm5jSMx4TcEU5ckf/X7vp7I102vjfpmya1h1NXj5xpfLaqfhGFeLiuHWJHrkBVPdxCSZGBG8sxuh2Eso5Q+MfBoFFtUn7Z6EzaXIuSfjFxUca5gzpLKdFyY9xHKQl7ZkFfXinuxk0ZUCYU3c2N8rsvoXfF7jSnR/oYJh7JysLIRqFjgi1FOznQkcZqowm+Nm5lUbClOXDLdr0IfyV3BVyHXNL9tBRJqM7ezNuKJRllTESTDOIszUMBoYq0ShgNdpAPj/K36E0peh2tMOcp1MQm0JmOhfxMuGWazibzjAkVN6S/PXXx1lgLk4O8Qnn93qthtqBWIFZUgWxzjDye0T8paRxx1G8jN4zPmK3vVEksRl47DFAP+cvEnUQvqOXWHsccYMFA2J3/b89yvBoNqE96dBeVdd2MCN2hmfyj07Q/KBEKvqVg9d3++7eqBcTSN6GfO7+3mpJMNAPZBRpt4WOiX6mwV+UaMIup0tj35s6hV73MxblZlfYIYmmhpObs6xsp4rZvYtlfAcnkGQgqpXrQkvUgbNoOJUnabF7n5Em9MbJecFPHp3WXEDQ== 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=57.103.67.53; envelope-from=mohamed@unpredictable.fr; helo=outbound.pv.icloud.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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 @unpredictable.fr) X-ZM-MESSAGEID: 1772538240032139100 Content-Type: text/plain; charset="utf-8" This combination is not allowed as of build 26300.7939 and results in: qemu-system-x86_64.exe: WHPX: Failed to setup partition, hr=3Dc0350005 qemu-system-x86_64.exe: failed to initialize whpx: Invalid argument Signed-off-by: Mohamed Mediouni --- target/i386/whpx/whpx-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 8dd6f68ff9..4afcbbae25 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -2147,7 +2147,7 @@ int whpx_accel_init(AccelState *as, MachineState *ms) goto error; } =20 - if (processor_features.Bank1.NestedVirtSupport) { + if (whpx_irqchip_in_kernel() && processor_features.Bank1.NestedVirtSup= port) { memset(&prop, 0, sizeof(WHV_PARTITION_PROPERTY)); prop.NestedVirtualization =3D 1; hr =3D whp_dispatch.WHvSetPartitionProperty( --=20 2.50.1 (Apple Git-155) From nobody Sat Apr 11 23:02:53 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=reject dis=none) header.from=unpredictable.fr ARC-Seal: i=1; a=rsa-sha256; t=1772538266; cv=none; d=zohomail.com; s=zohoarc; b=fcRCyVfTJgr8me+ap0OL1cl2GWgZT+m0KFRNIlAVvrAgKzjqgoEYb/zAQDB+AFaEMC+rc1qLQVmSJDR+065WOYoIsjjdcpGL0Ag96KcMhQWay0dqU8a34sB5LianYEy7OOPavoF5tnLm5dcet6C7pkN6MfyOJFTvRBzSHs2qiJU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772538266; h=Content-Transfer-Encoding:Cc:Cc: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; bh=gBxNQ3TjAYTeogiJbh69cd5jTUQ5SWnQGrtlwC8PRBY=; b=GNEj7BiZkCjS5F8ctm2/+bUyH60AYGgmmyiuRi5PYXPyjmW94K10qCpLoTPLxunIWfgx4AksJnPYUs0jALw0sJjE/LT18sxJxve0V/YvBAGibTEmpmXeb4o3cNZD88KWW54UqpTo7ElDxN64wFOn7NKwYxi37wIkW7IIVcHusYI= 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=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772538266002527.9194180294289; Tue, 3 Mar 2026 03:44:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxO8d-00058U-DH; Tue, 03 Mar 2026 06:42:07 -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 1vxO8R-00050m-LV for qemu-devel@nongnu.org; Tue, 03 Mar 2026 06:41:58 -0500 Received: from p-west1-cluster6-host9-snip4-6.eps.apple.com ([57.103.67.89] helo=outbound.pv.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxO8N-0001X0-VB for qemu-devel@nongnu.org; Tue, 03 Mar 2026 06:41:53 -0500 Received: from outbound.pv.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-west-1a-20-percent-3 (Postfix) with ESMTPS id 63F5918003AA; Tue, 3 Mar 2026 11:41:45 +0000 (UTC) Received: from localhost.localdomain (unknown [17.56.9.36]) by p00-icloudmta-asmtp-us-west-1a-20-percent-3 (Postfix) with ESMTPSA id EB99C180019D; Tue, 3 Mar 2026 11:41:42 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772538107; x=1775130107; bh=gBxNQ3TjAYTeogiJbh69cd5jTUQ5SWnQGrtlwC8PRBY=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=LazU0yilVk/axwl4yclOi++VSFHVI+Doodc56e4jwTRc24Oms925XYNK2Ak6DAgNgoRchDV1T2kzyV0Su8Iy5t3JTaGy8PBWQZb9CnA/J9UWKT7UwBxMEmheE7gwqokQ2w2mPtGujfwq1IgPmUP8n2ea3Nha29jbJ6PuW7PA+tUfaiZ9/UujBP53RlYAVaHf+KP/9IYWohWSZ2qVAdUSmq8ZclDFHigeIq0YY0YBohXd7DAPxtHUM/NqDAVaeitZeEEOkSYtd2j3MM0krSFUp6XGOxSXbKfnY9RXJaj/rqyZGt0BZgwBS8FFge35St63snI3COScDeTFEPmfRltiuQ== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , Pedro Barbuda , qemu-arm@nongnu.org, Wei Liu , Phil Dennis-Jordan , Roman Bolshakov , Cameron Esfahani , Peter Maydell Subject: [PATCH v2 2/6] target/i386: emulate: LA57 fix Date: Tue, 3 Mar 2026 12:41:31 +0100 Message-ID: <20260303114135.15390-3-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303114135.15390-1-mohamed@unpredictable.fr> References: <20260303114135.15390-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDA5MSBTYWx0ZWRfX5vF4xxSJbU/A Ok5LCyZBDBMwujehYBaOjnGK1eGQNV1wKcDUpyuEu0NEezXbbwtmsnUsZeD1D4jGprFsK1h+/He KlQcZPOlWv+JzMyPLixK9HDOORHJSVvn8ZzrVFPkyYjmTYt7XIm/TqtieviQC76Q7jrBmKjQbdg LsdFmg7p1rx+flBrvYYBIEvufutMXPkhhVEl7TyNFn7DJWCqMPcMlKj+X8OXyvvGRAP225rGU7T oeKOdXeqeDSgI0HE/1FLDtcHkz+XQEhQibgGozx5/0ZpJeYpGDI8jRwMDCUrGYttVpNVpPmuAOL z/EmYV22PuPqLVJxCNbH8JRchLKYNn8H55HjieM+RTkJ4WBSuk8MCmkh3AhiVg= X-Proofpoint-ORIG-GUID: VikLG5vIp_oNXXB1Ew6PkGcWpzU5bwz2 X-Authority-Info-Out: v=2.4 cv=XbKEDY55 c=1 sm=1 tr=0 ts=69a6c8fa cx=c_apl:c_pps:t_out a=azHRBMxVc17uSn+fyuI/eg==:117 a=azHRBMxVc17uSn+fyuI/eg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=AJrqCOfVdMXzVqk_6-kA:9 X-Proofpoint-GUID: VikLG5vIp_oNXXB1Ew6PkGcWpzU5bwz2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-02_05,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 clxscore=1030 suspectscore=0 bulkscore=0 malwarescore=0 mlxlogscore=781 phishscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030091 X-JNJ: AAAAAAABO4/qCN+wzhHdPgibQyVFJRCpD5XTftRNtAmidjqXTnfxch9iwNujtehQDvPZNgqcZx0KgzcreHzR+UsUxVh3y0n3I4p5WZoc4ColFESrC5oTIH6sc5/zxidCETGW+Xqv88uL8yYvVZGeB5YHnn5KC2g7+iui6CtbOmzOPk43a+9e1/EtQJKecKciADpAWI+9Vi3t8S3M1T7mA6OPm8QZZG7S+3eARz/trIO1dGepApYnR+qV+92uPoiKOuNLt51w0dkOeqQZknWtaCT00EymDOkwbtZ9f4Efs7YmG5gQ0M8npYj4bahLjxjdVurm0dGuWxWozV/T/42/toXixZx1zwTdnW2pvhFLqSGpjoonJ7mx8awJkMbvupfyqXnOmpoC0/+ZA/1De0eCUGZg51ePUuuRlbd2MtTHylgPycuZgFTWYTMXZBMTswy/bCEziHdEQxWo0jVciPzJNRe3H8UJW9Wd8fvNqLmUbhTPfQqj+liwGF76eUJ+gHrLKISS6yR5Lr2DpOKPT1Euw2kKNoD1y1TbJgP21uypaLX1CMxtegEwgDV3ZtGRSHOYFHJB2kEO3mnaqMWOV9UMReNrwy5S5KS0jtxh13UirWSgKP+eSN2yf8HrzN8vdC46sdOJRyn0iBaUkuy6HLILmVaaRhHz4vrmQDBQgoBLhSeQi2F4Bn3unJALzVHV2wMYebThXazZptC1BlZQIw== 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=57.103.67.89; envelope-from=mohamed@unpredictable.fr; helo=outbound.pv.icloud.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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 @unpredictable.fr) X-ZM-MESSAGEID: 1772538268023139100 Content-Type: text/plain; charset="utf-8" Seen on a Sapphire Rapids box with LA57. Signed-off-by: Mohamed Mediouni --- target/i386/emulate/x86_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/emulate/x86_mmu.c b/target/i386/emulate/x86_mmu.c index 8261ca1635..4e39bae025 100644 --- a/target/i386/emulate/x86_mmu.c +++ b/target/i386/emulate/x86_mmu.c @@ -56,7 +56,7 @@ static bool is_user(CPUState *cpu) struct gpt_translation { target_ulong gva; uint64_t gpa; - uint64_t pte[5]; + uint64_t pte[6]; }; =20 static int gpt_top_level(CPUState *cpu, bool pae) --=20 2.50.1 (Apple Git-155) From nobody Sat Apr 11 23:02:53 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=reject dis=none) header.from=unpredictable.fr ARC-Seal: i=1; a=rsa-sha256; t=1772538204; cv=none; d=zohomail.com; s=zohoarc; b=D/7opqGpUcDTg4ZrbbVNbukbYCW4PnFDUyUkYWk0znT4jxbd4y22kVfxh9dh69QdbP8Wt7o1evO38KI1BDIk/lCzaCjfKhDHURHRJbfFppOlspvQ4vJZyk6N2soHiXkhFxeQ8HqcPA75TFLECVDZQit+pPsdS6LyhlqkXl8r9jg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772538204; h=Content-Transfer-Encoding:Cc:Cc: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; bh=3JX8beg0C2Np1egU4bEnkRFyLgIrgwrt1tvpx/K3/Vk=; b=CG+RZ/LER3Lbcoko1sV1EQsFzc7QA8EsrlgREwRFtk+yKugdTwuZifOmWdBORqID+4iNrMUZcXvCfRNHd3EaiVLpTChwEhnmLFK6Wjr7fOVagBONb85XlVqBstFeI9ieedgnwU3JWbxTG3b9xEMDJGitrapNJB9MZ57WGuxTB4s= 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=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772538203755740.44934572422; Tue, 3 Mar 2026 03:43:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxO8k-0005DU-Rt; Tue, 03 Mar 2026 06:42:14 -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 1vxO8S-00050r-T0 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 06:41:58 -0500 Received: from p-west1-cluster6-host9-snip4-4.eps.apple.com ([57.103.67.87] helo=outbound.pv.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxO8R-0001Z7-Bl for qemu-devel@nongnu.org; Tue, 03 Mar 2026 06:41:56 -0500 Received: from outbound.pv.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-west-1a-20-percent-3 (Postfix) with ESMTPS id 694BB180018F; Tue, 3 Mar 2026 11:41:47 +0000 (UTC) Received: from localhost.localdomain (unknown [17.56.9.36]) by p00-icloudmta-asmtp-us-west-1a-20-percent-3 (Postfix) with ESMTPSA id 2AF0518003A9; Tue, 3 Mar 2026 11:41:45 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772538109; x=1775130109; bh=3JX8beg0C2Np1egU4bEnkRFyLgIrgwrt1tvpx/K3/Vk=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=A9y7u7fqSsQD5a4HrS9Qq0eSBCxs9B1QTgNzwtIfd7ObAvg3Ye8HlkLv2N6kWD5weY0QskHfDvtEeZXOqz9lTB9P2hePmmqDVlxboymWtvZPgADkfbG4dCCluPlH6lh040W61hvfNSxIv9SRLdaAWkPSa/SSPGhxwBWHqH7aVlGPv3jo2U224+F9IHZTQBGsRSa/6qvLaAbaYRkPcwy/9R/IdU4hW7WEyh5199GGlseFMjG7RGzYv+8P5OndmHzEwvAixoYaI1ertTQJAdQY5O6IjcVvA5+eNwtfgKgmHFmJlkBDXv0WyReczzQdxmrADQi+Dbmg2iVNFUkYje+AQw== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , Pedro Barbuda , qemu-arm@nongnu.org, Wei Liu , Phil Dennis-Jordan , Roman Bolshakov , Cameron Esfahani , Peter Maydell Subject: [PATCH v2 3/6] whpx: i386: enable some more enlightenments Date: Tue, 3 Mar 2026 12:41:32 +0100 Message-ID: <20260303114135.15390-4-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303114135.15390-1-mohamed@unpredictable.fr> References: <20260303114135.15390-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDA5MSBTYWx0ZWRfXzWNVSaQK93mK goltIb+ROX3mRrlDPEEqsNgtSk959lS/y8Re2kGUFjvrn/LFFWbTBI08TIE4e+80dJvlo+HeRSh 38zvILIEAqxtzKmOtZwi/vaPBQRwmfD/EBlxDkdK/DbHEmPsHtSixGNDL7G7T9rqY3PIk6GASV1 rRcgWk3Alc/JDMMdB5iXnsefBl92OrlO2+qMQGftTgglpZs0PH3jnbr5pSCEPx4GfMETUUaWPw2 +X4y4URC9T6xBHAgHYQAWpRpA8ivhEnyCe0g0jj2TV/V/dmjNvF+NkFG57bcE+CZlJcyiK09lGo dRKA6Fbk1GWL7gOR3d032nnoKAz+E2Ui8PEUkG8vEeYy5ZltBcb1nVZXl/HsNM= X-Proofpoint-GUID: 993l56XztUMv8Xathikgf_1mwdfQ0HWF X-Authority-Info-Out: v=2.4 cv=Q6ffIo2a c=1 sm=1 tr=0 ts=69a6c8fb cx=c_apl:c_pps:t_out a=azHRBMxVc17uSn+fyuI/eg==:117 a=azHRBMxVc17uSn+fyuI/eg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=lWQTlSF5RC17BzGQrLAA:9 X-Proofpoint-ORIG-GUID: 993l56XztUMv8Xathikgf_1mwdfQ0HWF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-02_05,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 clxscore=1030 adultscore=0 spamscore=0 bulkscore=0 mlxscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 mlxlogscore=756 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030091 X-JNJ: AAAAAAABpuECg+Od4x+29rOT0IHa9D/U0YNijVQaFjpgNd729uMpYEYe7hVgpJqP/6IVFtOHNIn4mYzQ6jnUmZgPkiIiLTAqNvxxDOkyuQH4FFpgUQV7mgbmvbhzpYwCnO7uDsnncrUj9mi5Ft3KhLDIBhVmczeB2gkQz+A8FdhB86KlmCdR+mNc+6+xDa9cn7+f8Q4DUwxP8uN0jwc1tv2/GAnUKAxr/5N5yEL5uPGECGh0ucEVybul9HyXgGebYVIyPFF/f+pPDIhSP2A8ptSB6Ds65OdLhwPJJZ09Z8x+xuLVAEDHiR1LpOog8apuBKaMgZ2iYvDPgj0R9/Jder4q2ZTA1nUkzvRPf6W4t4TnR3vCb2O5ICK0xJTrTnOa03K//KgE5IOl2VRfjmlEqqA/FgsjZ2czvlhThDIO/Lg473jFZ61EqpFbVvSNwYTp+IMo2dwPzj3WNQkwl2zT2nziz/8KzIHOBDKaZo5LkZI/LqUeHf26ZDvl978dZ5jcw3jmpK+go5HvK3+AeiH4r/Qlw5+nQdT4KAKc2v1HUnhynSIP0Oe/soUojXx6beZEop3WDKSBv3qCDhGBlOY7kMACmx+bPtocoYxWJ5qFufKyGQP8y2SpbioM+2VJnvJZcTFYYikBMcsUwxUioKaoqtjCs9jDw0CPmnzaU3TEe79qPL7+Lr95dBjo/594NEnfJuHWx+W6RofiAZoZ1MHiSTSnu9vuaWg= 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=57.103.67.87; envelope-from=mohamed@unpredictable.fr; helo=outbound.pv.icloud.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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 @unpredictable.fr) X-ZM-MESSAGEID: 1772538206916158500 Content-Type: text/plain; charset="utf-8" Signed-off-by: Mohamed Mediouni --- target/i386/whpx/whpx-all.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 4afcbbae25..915d79152e 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -2201,9 +2201,12 @@ int whpx_accel_init(AccelState *as, MachineState *ms) =20 synthetic_features.Bank0.HypervisorPresent =3D 1; synthetic_features.Bank0.Hv1 =3D 1; + synthetic_features.Bank0.AccessVpRunTimeReg =3D 1; synthetic_features.Bank0.AccessPartitionReferenceCounter =3D 1; synthetic_features.Bank0.AccessPartitionReferenceTsc =3D 1; + synthetic_features.Bank0.AccessHypercallRegs =3D 1; synthetic_features.Bank0.AccessFrequencyRegs =3D 1; + synthetic_features.Bank0.EnableExtendedGvaRangesForFlushVirtualAddress= List =3D 1; synthetic_features.Bank0.AccessVpIndex =3D 1; synthetic_features.Bank0.AccessHypercallRegs =3D 1; synthetic_features.Bank0.TbFlushHypercalls =3D 1; --=20 2.50.1 (Apple Git-155) From nobody Sat Apr 11 23:02:53 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=reject dis=none) header.from=unpredictable.fr ARC-Seal: i=1; a=rsa-sha256; t=1772538222; cv=none; d=zohomail.com; s=zohoarc; b=bji4YyxXXXiuYBpn88LYx78+ucqERuTV+8Dl4/wiDscKRJHNJQAwIYmwHya5OAJiFyhqm4l339ECrkGjz9UI7qk3Ef3eB5WjDRrWCzQma1CytD1CIYlx3xzGWmFv16sUECR4UGdcUxkvYa7f7ALnNt8haZhRphkVm8yBq45E/c8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772538222; h=Content-Transfer-Encoding:Cc:Cc: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; bh=ENulIaYe1hrBKX4sy4ybjhPR8v1QLe7vH2WpJAvLr7c=; b=oK1laedKyPjUp5yEa0OqLyaHkdHJq/k32vbAgLm0uoG4F3abKqx3mEiIXfeafselP9Dd/s3zJaqCWlXG/3dASbW8aEL0CWdH5fBTR+2QalPWCSt/to0YVbgFRCamHupX9EdWy7waObCjvjF5yFI7e/u2AT97zJQINkRpQDNHY5s= 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=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772538222018270.4682055577098; Tue, 3 Mar 2026 03:43:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxO8m-0005GO-7b; Tue, 03 Mar 2026 06:42:16 -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 1vxO8T-00051E-AV for qemu-devel@nongnu.org; Tue, 03 Mar 2026 06:41:58 -0500 Received: from p-west1-cluster6-host11-snip4-7.eps.apple.com ([57.103.67.10] helo=outbound.pv.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxO8R-0001ZS-E4 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 06:41:57 -0500 Received: from outbound.pv.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-west-1a-20-percent-3 (Postfix) with ESMTPS id 9969E18001BE; Tue, 3 Mar 2026 11:41:49 +0000 (UTC) Received: from localhost.localdomain (unknown [17.56.9.36]) by p00-icloudmta-asmtp-us-west-1a-20-percent-3 (Postfix) with ESMTPSA id 55361180018D; Tue, 3 Mar 2026 11:41:47 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772538112; x=1775130112; bh=ENulIaYe1hrBKX4sy4ybjhPR8v1QLe7vH2WpJAvLr7c=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=USJela9l9qypoTe25SJrzFsicsr4zDiw5vQTetEgCa3GdPZ3kgu/dsY6kD6N5Q5y5kMU17oDHZEwiSBvSyzzAGWCPh2F6pGc/TfyIWfYVohjhniG61BzQprmwSzItMvwY3uM1C9fKOM1qLJFR5eCTFiskUzO9KMI9y7t9rxvWvQp10tzsWSGO8SyFzu/5fB4tigkN2jbQPypT8kzt9t8uk1jKeVwkSKHiEzMPjHwSl/36XQNCqWY+dMfWLSNf9OtuFGkBI/KXXg4uFcZ6+0PNpsvA4tsPLO8fm0mcG44DpawXOtwLMc1di5wlgciaVn5W0bt/VA5/vF8RAh4bOH9Hw== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , Pedro Barbuda , qemu-arm@nongnu.org, Wei Liu , Phil Dennis-Jordan , Roman Bolshakov , Cameron Esfahani , Peter Maydell Subject: [PATCH v2 4/6] whpx: make Hyper-V enlightenments configurable Date: Tue, 3 Mar 2026 12:41:33 +0100 Message-ID: <20260303114135.15390-5-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303114135.15390-1-mohamed@unpredictable.fr> References: <20260303114135.15390-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDA5MSBTYWx0ZWRfX4C7KV3f8j+Xy GSpbkUFT940n4QqHK3lwejkfH18CL+yZ4dgP/27VrTjyGYhLeO8HjWpWzzl64t4IMG3o6/tJ2S8 28+2VH6Yoke+UcnkM6ROQ3ACgMm50W8F3T5qNblzSNfI9tHbQ3fR0ccjE/mENHtcYsovdHRvdOK nvIXvCI4qv5TmDfNCQ2hvO5bO/Ae5Fz4Z9KltRpA9Z5SSAfIJpuG31ijF0g998O45HwDPWrrfk1 mCneMfMQaIX2uXsWylkj/TS5sZ5Hn7j6PvxGBJtaccNWzf/SI4YhKkiojylZOI+9DS4VX///5rj 6zR4PLHbpf7+9ndH6HCfupMbsSZF6sP+W+gQ4zjRI4kwgXIh4UNNSd+HImlI4g= X-Authority-Info-Out: v=2.4 cv=IuITsb/g c=1 sm=1 tr=0 ts=69a6c8fe cx=c_apl:c_pps:t_out a=azHRBMxVc17uSn+fyuI/eg==:117 a=azHRBMxVc17uSn+fyuI/eg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=BRqF0JgGwH6LvUrOcfoA:9 X-Proofpoint-GUID: Nc0Gy-h24n_64VIQ5rLCvkml7XhccyEV X-Proofpoint-ORIG-GUID: Nc0Gy-h24n_64VIQ5rLCvkml7XhccyEV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-02_05,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 adultscore=0 clxscore=1030 phishscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030091 X-JNJ: AAAAAAABfCeNVSDZBB5M76o1XP0NwdVnMN7ZGnU503lUDoLgq0FjVgX9VYzxKvi+dW96PseBUukatFXmpNaINDy44kzVwW3VbSl55e+e3rnDG36DqL3r3BXX9M/C03Yk/OXbrXYra/74m5CA+AppctRAi5xd4GOTtrCJ0pieTN5qUlRb4tqB7O9e6Ng9jPBSH/7NSs+OOJJOyQ28KGXbGthmEX4rffOXG1Tm0tuw4TlKim5zYTPBLjDbK7anbR6y5IxsgwgriLsxAlRdofU1fy7bfQmWtz8Iw0JBHzOfSA2laDqcihufWAUqPzYrXG69LBrLtZjNp32w0lrS+hheTj0juT6cBMXfQknoASjxn48cstqVcxEfHLroyy0XsKMJ3SKsci8qJ5HMSU+8801ZtANPd23yrAuj7F//8ej2AjJsJccXsGiF4yHOe5xF/8SWcC7YZfHtKPLTND2xWKGW+oRsVUGz5LfaZAGaABPdOzGOw9Pdyo2CqC1fXjxJIoWIdywoMKq8nyLqwnQKnymCTsbrHPuFOXNNxrdiNslL9b7bUbukKsPtslZVTm2U1D2Vdz0bV2q8DlreZMlkqyzI+Qf/oXA2eABQlu6+aAm/jaxE6BjdJQ2VctIw4L/pGIPe1U4SBWEvJniy/TWkcky29ff0amdZO/zmoeIiiKyA9p9f7WDCxdSdYBJE19HOGCx2PvE2hXlYJ06CFSspAKerCm/m808E 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=57.103.67.10; envelope-from=mohamed@unpredictable.fr; helo=outbound.pv.icloud.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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 @unpredictable.fr) X-ZM-MESSAGEID: 1772538223840139100 Content-Type: text/plain; charset="utf-8" Have them be a machine option instead of a CPU one, to have something avail= able, even if not ideal... The existing Hyper-V enlightenments configuration mechanism is part of per-= CPU configuration, which happens too late for this. Signed-off-by: Mohamed Mediouni --- accel/whpx/whpx-common.c | 43 ++++++++++++++++++++++++++++++++++ include/system/whpx-internal.h | 4 ++++ target/i386/whpx/whpx-all.c | 20 +++++++++------- 3 files changed, 58 insertions(+), 9 deletions(-) diff --git a/accel/whpx/whpx-common.c b/accel/whpx/whpx-common.c index 4863fc8663..a75d4338e2 100644 --- a/accel/whpx/whpx-common.c +++ b/accel/whpx/whpx-common.c @@ -25,6 +25,7 @@ #include "qapi/qapi-visit-common.h" #include "migration/blocker.h" #include "accel/accel-cpu-target.h" +#include "qemu/target-info.h" #include =20 #include "system/whpx-internal.h" @@ -470,6 +471,40 @@ static void whpx_set_kernel_irqchip(Object *obj, Visit= or *v, } } =20 +static void whpx_set_hyperv(Object *obj, Visitor *v, + const char *name, void *opaque, + Error **errp) +{ + struct whpx_state *whpx =3D &whpx_global; + OnOffAuto mode; + + if (!visit_type_OnOffAuto(v, name, &mode, errp)) { + return; + } + + switch (mode) { + case ON_OFF_AUTO_ON: + whpx->hyperv_enlightenments_allowed =3D true; + whpx->hyperv_enlightenments_required =3D true; + break; + + case ON_OFF_AUTO_OFF: + whpx->hyperv_enlightenments_allowed =3D false; + whpx->hyperv_enlightenments_required =3D false; + break; + + case ON_OFF_AUTO_AUTO: + whpx->hyperv_enlightenments_allowed =3D true; + whpx->hyperv_enlightenments_required =3D false; + default: + /* + * The value was checked in visit_type_OnOffAuto() above. If + * we get here, then something is wrong in QEMU. + */ + abort(); + } +} + static void whpx_cpu_accel_class_init(ObjectClass *oc, const void *data) { AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); @@ -498,6 +533,11 @@ static void whpx_accel_class_init(ObjectClass *oc, con= st void *data) NULL, NULL); object_class_property_set_description(oc, "kernel-irqchip", "Configure WHPX in-kernel irqchip"); + object_class_property_add(oc, "hyperv", "OnOffAuto", + NULL, whpx_set_hyperv, + NULL, NULL); + object_class_property_set_description(oc, "hyperv", + "Configure Hyper-V enlightenments"); } =20 static void whpx_accel_instance_init(Object *obj) @@ -507,6 +547,9 @@ static void whpx_accel_instance_init(Object *obj) memset(whpx, 0, sizeof(struct whpx_state)); /* Turn on kernel-irqchip, by default */ whpx->kernel_irqchip_allowed =3D true; + + whpx->hyperv_enlightenments_allowed =3D true; + whpx->hyperv_enlightenments_required =3D false; } =20 static const TypeInfo whpx_accel_type =3D { diff --git a/include/system/whpx-internal.h b/include/system/whpx-internal.h index e7b915ccbf..abea3ddeee 100644 --- a/include/system/whpx-internal.h +++ b/include/system/whpx-internal.h @@ -41,6 +41,10 @@ struct whpx_state { =20 bool kernel_irqchip_allowed; bool kernel_irqchip_required; + + bool hyperv_enlightenments_allowed; + bool hyperv_enlightenments_required; + }; =20 extern struct whpx_state whpx_global; diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 915d79152e..4968a5a3e4 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -2219,15 +2219,17 @@ int whpx_accel_init(AccelState *as, MachineState *m= s) synthetic_features.Bank0.DirectSyntheticTimers =3D 1; } =20 - hr =3D whp_dispatch.WHvSetPartitionProperty( - whpx->partition, - WHvPartitionPropertyCodeSyntheticProcessorFeaturesBanks, - &synthetic_features, - sizeof(WHV_SYNTHETIC_PROCESSOR_FEATURES_BANKS)); - if (FAILED(hr)) { - error_report("WHPX: Failed to set synthetic features, hr=3D%08lx",= hr); - ret =3D -EINVAL; - goto error; + if (whpx->hyperv_enlightenments_allowed) { + hr =3D whp_dispatch.WHvSetPartitionProperty( + whpx->partition, + WHvPartitionPropertyCodeSyntheticProcessorFeaturesBanks, + &synthetic_features, + sizeof(WHV_SYNTHETIC_PROCESSOR_FEATURES_BANKS)); + if (FAILED(hr)) { + error_report("WHPX: Failed to set synthetic features, hr=3D%08= lx", hr); + ret =3D -EINVAL; + goto error; + } } =20 /* Register for MSR and CPUID exits */ --=20 2.50.1 (Apple Git-155) From nobody Sat Apr 11 23:02:53 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=reject dis=none) header.from=unpredictable.fr ARC-Seal: i=1; a=rsa-sha256; t=1772538248; cv=none; d=zohomail.com; s=zohoarc; b=KgPN6kefzI8K7oxa16A66elV8vLMg95J6miR6Nz98YU37zdlcsU5kdng7bkeCVzNi4/jlBk7r4yEJD9aGqKliViIC6S1Ao7ha+wuvGTRDZcAW2XK3HjMi1J+SrUtovX/tSBubkn39CCTbH0guyrmhrRWzk8SaSXqE0HBGd+n/l0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772538248; h=Content-Transfer-Encoding:Cc:Cc: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; bh=OW8S3KLD8zFsAuvhuwhxPEOWPDp1M7oc2dpZI+SomHI=; b=WbU7BCLgU/TqWV9mw7c98jeGM/Ev0t4i/wuix4zV4tgo1vjhkOxamwhQ2ejJ6dxu9yQXOfZUP+zJSlgm+KPnz4nU1cEbZXedzE0LsN3LRee5mgz5Ry7UBebAjppdyHSZkktvWlS7bhQdSVbT4cwj+7rPLTNrrAFZQSx3HYkc6Lk= 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=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772538248126732.3653362548872; Tue, 3 Mar 2026 03:44:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxO8d-000586-DM; Tue, 03 Mar 2026 06:42:07 -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 1vxO8T-000511-57 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 06:41:58 -0500 Received: from p-west1-cluster6-host12-snip4-7.eps.apple.com ([57.103.67.20] helo=outbound.pv.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxO8R-0001Zu-GL for qemu-devel@nongnu.org; Tue, 03 Mar 2026 06:41:56 -0500 Received: from outbound.pv.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-west-1a-20-percent-3 (Postfix) with ESMTPS id F3CA01800394; Tue, 3 Mar 2026 11:41:51 +0000 (UTC) Received: from localhost.localdomain (unknown [17.56.9.36]) by p00-icloudmta-asmtp-us-west-1a-20-percent-3 (Postfix) with ESMTPSA id 9689E18001A4; Tue, 3 Mar 2026 11:41:49 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772538113; x=1775130113; bh=OW8S3KLD8zFsAuvhuwhxPEOWPDp1M7oc2dpZI+SomHI=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=dZukHbEl/NKiaddu2CmgMLKZT320rwPc5aUuyiN6gvX0kSjF5bY7hZysTNX3Tya364Imx2XGzLS2G6meT2ggZQKjhx+3sEIp/nZwYZCFWDwUv5YWZ1TbbAgV3b3JoFuPEWU3cmWUFY2BvCd6GRvRcwcI1fBJLCFE+Qj2mp9b4RRQZZVglAOstXXKmFG6CmCxg/7EpZQ/feXR3A/BWwksi0EB7zw/21ux56AzDaYUJf59C2evDDeocsZ60tYTR+58vUT5B/4OkCCOZnvTng+qbDqfG/FIIY6Lxvng+t5r2PfDauCEIzdUfBzMRKkYoPDt7X1BmHnoRjcVt2ypVJfYow== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , Pedro Barbuda , qemu-arm@nongnu.org, Wei Liu , Phil Dennis-Jordan , Roman Bolshakov , Cameron Esfahani , Peter Maydell Subject: [PATCH v2 5/6] whpx: arm64: enable enlightenments if asked for Date: Tue, 3 Mar 2026 12:41:34 +0100 Message-ID: <20260303114135.15390-6-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303114135.15390-1-mohamed@unpredictable.fr> References: <20260303114135.15390-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: sR0TYWbTkNr5mkpU_bIqLVMMw57vtP6T X-Authority-Info-Out: v=2.4 cv=cbXfb3DM c=1 sm=1 tr=0 ts=69a6c900 cx=c_apl:c_pps:t_out a=azHRBMxVc17uSn+fyuI/eg==:117 a=azHRBMxVc17uSn+fyuI/eg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=rOdoSoqhRWX9tc6y9DEA:9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDA5MSBTYWx0ZWRfXxbv1S8RniUI3 vA4mVG1WZGmIR3eHCxwra9fN9hQPzTa9VNogtAv4pe/ZveD8xch9Jj03CIzMW7Kb4rs2CsXuzWg hUnjCK2ni6baS7+10j+kdE07Dlq8lvXfA0CVl2FlLRbbgFezrw+Do830Y+mUSm1If5xVMlbAKLL djqfPHwfLErHZwoyL+V7n++lmRMrmYEcUPTwqychc3rdKwRe/goN8lRfEgMxUX1e3U13J+h85n1 vCGtB2huxxvkNU4hG8pnYXtMbnjAV2Y1fO5amtL2iXh8XklhqK1NCZCQY4M+IlOFsmG7FGsHmKE s87/qQQr2WUtYDJLACBsx8giyiLfRIO5v7p9S7Uu0FcY5lBgog9Oloxo1fN92w= X-Proofpoint-GUID: sR0TYWbTkNr5mkpU_bIqLVMMw57vtP6T X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-02_05,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 suspectscore=0 adultscore=0 mlxlogscore=685 mlxscore=0 clxscore=1030 phishscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030091 X-JNJ: AAAAAAABkacgR1d09a4ToUGSnuHbZs1Qu6KEk87AEaAikjGWvbs/AJag9stJKunSNKoiDQOQbKbJQYQMnZKZUQT2pQFE7SJQe6v5cJ9lj3XVIZHXuhXWWmJEyWXgU3dXR9m/bhsVreVOMNcVTqTfocQjkd52AB+NGfsGOz1ZS+i/YchR9MCAtuR7sOkRdhC/RvIzh6+GLPeruF/VuSug2sOJb9vYB53ejBDcCUuxw8dJnbdFqFIYJAWF7qA1TesNHQZk0iMXJaeB2PNsqzQ1oQor26iRZL4uqThPfegJTHuzO46g5TTguATNJQgHAFTWya7UR1mrQQ3YwMlTkrR97VRmFokiS1ZyTppuR7U1O4zbFHPEt1x6a4wNmBDR6/w1LoCDNakJrPGtkvUkgS0Z/n+44LzvJzpN/Gro2+gb8uMgPLeIu5iAKeek9E31KRqfI9taJ/ZqliuhOmRrX+pO/f3M+YTJZTHY8lccfsOWBtSh/bVMfG/bCHarIdPozXQsdWUZOQgyfPYtRoy+zED8nDvgaK1FUVs1TJJHMmUMB6IYWUyyTL20Fpi3J+M8C4NCDUlDfRC1qAsuxFwY18OXFQWOIakg9ruu1Q5bvqbdGvlG9OYerAGmzw1qRXOd+BCLZAGWly3Lswi2XEM5q0thnUa5EaB9Cio4hcjB8NHxwtd2LUFokTYbHQr5JyVUstI0Von2XQPBWJFVE8ua1wvo4KMYM8Tr 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=57.103.67.20; envelope-from=mohamed@unpredictable.fr; helo=outbound.pv.icloud.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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 @unpredictable.fr) X-ZM-MESSAGEID: 1772538249870139100 Content-Type: text/plain; charset="utf-8" Signed-off-by: Mohamed Mediouni --- target/arm/whpx/whpx-all.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/target/arm/whpx/whpx-all.c b/target/arm/whpx/whpx-all.c index bb94eac7bf..9983d59a38 100644 --- a/target/arm/whpx/whpx-all.c +++ b/target/arm/whpx/whpx-all.c @@ -947,6 +947,43 @@ int whpx_accel_init(AccelState *as, MachineState *ms) goto error; } =20 + /* Enable synthetic processor features */ + WHV_SYNTHETIC_PROCESSOR_FEATURES_BANKS synthetic_features; + memset(&synthetic_features, 0, sizeof(WHV_SYNTHETIC_PROCESSOR_FEATURES= _BANKS)); + synthetic_features.BanksCount =3D 1; + + synthetic_features.Bank0.HypervisorPresent =3D 1; + synthetic_features.Bank0.Hv1 =3D 1; + synthetic_features.Bank0.AccessVpRunTimeReg =3D 1; + synthetic_features.Bank0.AccessPartitionReferenceCounter =3D 1; + synthetic_features.Bank0.AccessPartitionReferenceTsc =3D 1; + synthetic_features.Bank0.AccessHypercallRegs =3D 1; + synthetic_features.Bank0.AccessVpIndex =3D 1; + synthetic_features.Bank0.AccessHypercallRegs =3D 1; + synthetic_features.Bank0.TbFlushHypercalls =3D 1; + synthetic_features.Bank0.AccessSynicRegs =3D 1; + synthetic_features.Bank0.AccessSyntheticTimerRegs =3D 1; + synthetic_features.Bank0.AccessIntrCtrlRegs =3D 1; + synthetic_features.Bank0.SyntheticClusterIpi =3D 1; + synthetic_features.Bank0.DirectSyntheticTimers =3D 1; + + /* + * On ARM64, have enlightenments off by default=20 + * as they're not needed for performance. + */ + if (whpx->hyperv_enlightenments_required) { + hr =3D whp_dispatch.WHvSetPartitionProperty( + whpx->partition, + WHvPartitionPropertyCodeSyntheticProcessorFeaturesBanks, + &synthetic_features, + sizeof(WHV_SYNTHETIC_PROCESSOR_FEATURES_BANKS)); + if (FAILED(hr)) { + error_report("WHPX: Failed to set synthetic features, hr=3D%08= lx", hr); + ret =3D -EINVAL; + goto error; + } + } + hr =3D whp_dispatch.WHvSetupPartition(whpx->partition); if (FAILED(hr)) { error_report("WHPX: Failed to setup partition, hr=3D%08lx", hr); --=20 2.50.1 (Apple Git-155) From nobody Sat Apr 11 23:02:53 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=reject dis=none) header.from=unpredictable.fr ARC-Seal: i=1; a=rsa-sha256; t=1772538256; cv=none; d=zohomail.com; s=zohoarc; b=is9b5mRovQcZ0rapYSJOv5KojMQLs5okfJ9RN8cUd69HljR/DK3HBa8Rs3kZvHWG+/tlVF6zAN+duqiBnyDx8b3h6F+JU722WQOlKvOgsjP7SY3FpYbE5eO9bVEgGsqzl5oIIce//5F8P+l4/cSSCif1EOv9uTdL5BENDoKdHEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772538256; h=Content-Transfer-Encoding:Cc:Cc: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; bh=xfi6rjeDQo4vpSHmbqs0x+tY5PCeD7vMjLpTj63mmJI=; b=G5qwNOOTngGClmpUx/7HZ8VzkqmfdS1mE9nRlxe1PUYonysOFq572U5f+jSIoWUXJP9X0MKbpqoB4fAtGvmTJXXBJDAocOVHxvoIsgujZ4XZd6bxyx6TPV/v66GOwKEQ+4e53z75nbGC0EJ1vTf/z0/eUZfuxjGeZxa08XsgBek= 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=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772538256351284.47289664979246; Tue, 3 Mar 2026 03:44:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxO8l-0005F6-Hf; Tue, 03 Mar 2026 06:42:15 -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 1vxO8b-000580-E8 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 06:42:07 -0500 Received: from p-west1-cluster3-host6-snip4-2.eps.apple.com ([57.103.66.15] helo=outbound.pv.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxO8X-0001cJ-V1 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 06:42:04 -0500 Received: from outbound.pv.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-west-1a-20-percent-3 (Postfix) with ESMTPS id 8CB0A18000AC; Tue, 3 Mar 2026 11:41:54 +0000 (UTC) Received: from localhost.localdomain (unknown [17.56.9.36]) by p00-icloudmta-asmtp-us-west-1a-20-percent-3 (Postfix) with ESMTPSA id C19761800194; Tue, 3 Mar 2026 11:41:51 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772538118; x=1775130118; bh=xfi6rjeDQo4vpSHmbqs0x+tY5PCeD7vMjLpTj63mmJI=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=ANz5olkz3ovdVCBtXguNYEpQYBgJazELBa7yZzMKVaTXepSkd2QfjOrP42evyvsQe293F8JKz0+IaKux/KEarJSmib+KiY1U1FKtV2aLsWfACVcd/JjP5oMpY55IanQ0hFvTIhmYQ/o9PvrQ1Lpjl60JZqwfbNVP3ay+x8k0HBCrbm0zvtcmEqvgMB16XNBbVJ5a+FQj8ieW5c/It/pKns4QFE+9PK2YGzE/zPWb3atdshGALeZtWfGWa4l087Al4OOwzwzt0URuM6q3v2obXd8LQTkOjhaj5IeVtgiSn5/m9ay3DAvRhNunFM+g6Nkx8Lo064nVGhHRsl2UnDw4Rg== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , Pedro Barbuda , qemu-arm@nongnu.org, Wei Liu , Phil Dennis-Jordan , Roman Bolshakov , Cameron Esfahani , Peter Maydell Subject: [PATCH v2 6/6] whpx: i386: remove SIPI trapping Date: Tue, 3 Mar 2026 12:41:35 +0100 Message-ID: <20260303114135.15390-7-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303114135.15390-1-mohamed@unpredictable.fr> References: <20260303114135.15390-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDA5MSBTYWx0ZWRfX7oY5yHbtbqyW AZrbUjrSNXzKDcyzn+00kemUTX48LXQ8QE2S+ffL13F7JNCPFkuhwnJRDCy6vqC1p6t+23uZmHL LijrM/Yfd7lKO3oZD6isY+7gqpdX8iuWuNCYyet2rmnITNpemnXenwgGjqyO62IrK9n9Xk3ViZC nq9I7tWem572OmakiFsJD/xYBOdNaEYhihTNul9BgUv76+P1Gs3k/Spbx8Mxm1MZzxXSSseNTXQ sJDgGhGUxyHL0B8qX6FfsB8YCjyuYIDkzM2uz95uBhuP2/mF0Nkh7ZXyqwBJHAkMVuBdck8Eq9s jISy2/L/Dq5SmAS/3fxss3xGCAejc5NCXuwS+/ufEQt4A4kB0OcgsKABx967e4= X-Proofpoint-GUID: m1Y-2qdMY6rixghNl_IltWIcxdKTo8SL X-Authority-Info-Out: v=2.4 cv=EJcLElZC c=1 sm=1 tr=0 ts=69a6c903 cx=c_apl:c_pps:t_out a=azHRBMxVc17uSn+fyuI/eg==:117 a=azHRBMxVc17uSn+fyuI/eg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=Xl7PRCIL3n5FuX7mVuoA:9 X-Proofpoint-ORIG-GUID: m1Y-2qdMY6rixghNl_IltWIcxdKTo8SL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-02_05,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 clxscore=1030 mlxlogscore=882 bulkscore=0 adultscore=0 lowpriorityscore=0 mlxscore=0 phishscore=0 suspectscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030091 X-JNJ: AAAAAAAB9xpHP4qgpueVBMhQC/CSK1uCW5wop07nzXt21aDVTfhuhSasWJryzCrI7cRQ2rzYCEf6Ko8jaKOc1c9TKuXZ4b0rGF+/4GcwAiLjz7UuVpaaFvrtSAisAyjSVwP1AQdBRP8PCt09374xhWhjQNP8D97V6ODWr9g1SG/ULRL/I9ti0qiL6d0UCwubJrfbWwKwVhJRiPa85FAlisKlQSF+MRuTKmmP6h+LDCZxQZ8NpediygB7hlh+ae4dNzmazowJ4vJbcJbd5tcJjKmFkRGlaQd++KXTucurU834agkwDo/l2vrOUPJdb5YQbke8TnBVIY7AVHSDUqFTSi+uC6sc1X98e0w1caInSgunzzfsFj7MlALkLQ923dgYPmBifzAQly1t/84GgVviw7M8D/5zrhkBQTvYLvebed/K5LgQd4oYqt/WobLgeXUMmVFZux9lRADpu6LuTXKxin2e/z3kn8PqH3RQlZ2Dm7hr8FRwbbesqJggduDYcvexSpC3d9ilXghy/Go+n6gxMUGY6y4IvVtJx4GuB++y4VYybAW8wajljauMtdoFqQRM9MGWBZVU0mEiMVT6dKgj/XEAX3ZysRW1WUynRN2TrLJxpYbnxYo5+LTXhREVvmMH8tvDNO6et6+a5yG8lQ716waeBVbfoNo3VBVFGQGPzmw1gi+iO+rKidm24LcTKqTTyTXztFtdTVqTEZDpUmpAOsS+uGpDJJt+76bH 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=57.103.66.15; envelope-from=mohamed@unpredictable.fr; helo=outbound.pv.icloud.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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.968, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.495, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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 @unpredictable.fr) X-ZM-MESSAGEID: 1772538258014139100 Content-Type: text/plain; charset="utf-8" The implementation in Hyper-V works fine and the code currently present doesn't handle x2APIC correctly anyway, so remove it and use the implementation in Hyper-V. Signed-off-by: Mohamed Mediouni --- target/i386/whpx/whpx-all.c | 97 ------------------------------------- 1 file changed, 97 deletions(-) diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 4968a5a3e4..fa78218f80 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -1679,100 +1679,6 @@ int whpx_vcpu_run(CPUState *cpu) ret =3D whpx_handle_halt(cpu); break; =20 - case WHvRunVpExitReasonX64ApicInitSipiTrap: { - WHV_INTERRUPT_CONTROL ipi =3D {0}; - uint64_t icr =3D vcpu->exit_ctx.ApicInitSipi.ApicIcr; - uint32_t delivery_mode =3D - (icr & APIC_ICR_DELIV_MOD) >> APIC_ICR_DELIV_MOD_SHIFT; - int dest_shorthand =3D - (icr & APIC_ICR_DEST_SHORT) >> APIC_ICR_DEST_SHORT_SHIFT; - bool broadcast =3D false; - bool include_self =3D false; - uint32_t i; - - /* We only registered for INIT and SIPI exits. */ - if ((delivery_mode !=3D APIC_DM_INIT) && - (delivery_mode !=3D APIC_DM_SIPI)) { - error_report( - "WHPX: Unexpected APIC exit that is not a INIT or SIPI= "); - break; - } - - if (delivery_mode =3D=3D APIC_DM_INIT) { - ipi.Type =3D WHvX64InterruptTypeInit; - } else { - ipi.Type =3D WHvX64InterruptTypeSipi; - } - - ipi.DestinationMode =3D - ((icr & APIC_ICR_DEST_MOD) >> APIC_ICR_DEST_MOD_SHIFT) ? - WHvX64InterruptDestinationModeLogical : - WHvX64InterruptDestinationModePhysical; - - ipi.TriggerMode =3D - ((icr & APIC_ICR_TRIGGER_MOD) >> APIC_ICR_TRIGGER_MOD_SHIF= T) ? - WHvX64InterruptTriggerModeLevel : - WHvX64InterruptTriggerModeEdge; - - ipi.Vector =3D icr & APIC_VECTOR_MASK; - switch (dest_shorthand) { - /* no shorthand. Bits 56-63 contain the destination. */ - case 0: - ipi.Destination =3D (icr >> 56) & APIC_VECTOR_MASK; - hr =3D whp_dispatch.WHvRequestInterrupt(whpx->partition, - &ipi, sizeof(ipi)); - if (FAILED(hr)) { - error_report("WHPX: Failed to request interrupt hr=3D= %08lx", - hr); - } - - break; - - /* self */ - case 1: - include_self =3D true; - break; - - /* broadcast, including self */ - case 2: - broadcast =3D true; - include_self =3D true; - break; - - /* broadcast, excluding self */ - case 3: - broadcast =3D true; - break; - } - - if (!broadcast && !include_self) { - break; - } - - for (i =3D 0; i <=3D max_vcpu_index; i++) { - if (i =3D=3D cpu->cpu_index && !include_self) { - continue; - } - - /* - * Assuming that APIC Ids are identity mapped since - * WHvX64RegisterApicId & WHvX64RegisterInitialApicId regi= sters - * are not handled yet and the hypervisor doesn't allow the - * guest to modify the APIC ID. - */ - ipi.Destination =3D i; - hr =3D whp_dispatch.WHvRequestInterrupt(whpx->partition, - &ipi, sizeof(ipi)); - if (FAILED(hr)) { - error_report( - "WHPX: Failed to request SIPI for %d, hr=3D%08lx", - i, hr); - } - } - - break; - } - case WHvRunVpExitReasonCanceled: if (exclusive_step_mode !=3D WHPX_STEP_NONE) { /* @@ -2236,9 +2142,6 @@ int whpx_accel_init(AccelState *as, MachineState *ms) memset(&prop, 0, sizeof(WHV_PARTITION_PROPERTY)); prop.ExtendedVmExits.X64MsrExit =3D 1; prop.ExtendedVmExits.ExceptionExit =3D 1; - if (whpx_irqchip_in_kernel()) { - prop.ExtendedVmExits.X64ApicInitSipiExitTrap =3D 1; - } =20 hr =3D whp_dispatch.WHvSetPartitionProperty( whpx->partition, --=20 2.50.1 (Apple Git-155)