From nobody Sat Apr 11 23:08:12 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=1772571189; cv=none; d=zohomail.com; s=zohoarc; b=SQZuVraXj6m88aeU9/rABFrhJTOBW6vT59T1gqFqMOCEy+WcySmVQe9tvBL4r5RTgk4zPho2IVilO5KdDgg5nBYbG0N3FZawJJKvak3Ju4npia47t4X4OP3h2f36mIPLTE4IfRZCtp5Waty4wul83u1jatPmq/VGfwVeHR20SXY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772571189; 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=+NoH88IZWNOWXHn7XiZHTQBxVxI8RNautRlaqzdVGdA=; b=HqoGcA+mzaIRixqiKVUZTorq7cdLfMv4G62KVdqOt+IkEiXZ7BpODoUqkay8kawDWQ4ZGlFVQph83dpiJx3Jnopbaw1DzX8ADyjYcwU3PTLxcASe5Odk7M1oVkXarEiR8ez4dNKpYVGbMRTK0mpK3SMuhrr+oSaOSP1q13ZqZRY= 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 1772571189253726.6667625456046; Tue, 3 Mar 2026 12:53:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxWig-0008Rw-HC; Tue, 03 Mar 2026 15:51:54 -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 1vxWib-0008Cw-0k for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:49 -0500 Received: from p-east2-cluster4-host9-snip4-5.eps.apple.com ([57.103.78.216] helo=outbound.st.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxWiY-0001V7-H1 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:48 -0500 Received: from outbound.st.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPS id BED3C180015B; Tue, 3 Mar 2026 20:51:44 +0000 (UTC) Received: from localhost.localdomain (unknown [17.42.251.67]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPSA id E48981802BD2; Tue, 3 Mar 2026 20:51:42 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772571105; x=1775163105; bh=+NoH88IZWNOWXHn7XiZHTQBxVxI8RNautRlaqzdVGdA=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=AKJmE2RacTeb83Jv/I0hCFjdBrv5Gq2SY63QlPZ9xyEtypG1nylE6aCZbiJr1mRREEfKdbRSPPuGxMN1T1O6BfYnd0EBGc/ApzvDohrZEkAdnJX5lb9XIgHIpn3Er4W72BJ3ZVZNjFK3wVpuL9ppNW9q47TAE5ShSZqFo+LJwX4X5HuQaFV2VMYfrj/KTLe/98+KxlP3OlSkv3wQMZaEZLdHCqEDaG44q92LEgXmqEIwgBYReuNS5C6+bEh/cm9jMYgpDkD75HNMtC6FuAOutxINiu3Hz9mmMUX7PKmZgRsVLWvM0pMKTtDolvJuOCa7OQgRruvtRt5QTWj9MrJ7Xw== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , "Michael S. Tsirkin" , Peter Maydell , Cameron Esfahani , Pedro Barbuda , Wei Liu , Zhao Liu , Roman Bolshakov , Paolo Bonzini , qemu-arm@nongnu.org, Phil Dennis-Jordan , Pierrick Bouvier Subject: [PATCH v4 1/7] target/i386/hvf/hvf.c: fix compilation Date: Tue, 3 Mar 2026 21:51:32 +0100 Message-ID: <20260303205138.32450-2-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303205138.32450-1-mohamed@unpredictable.fr> References: <20260303205138.32450-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDE3MSBTYWx0ZWRfXxqBqYazqw4Iy 7qC5K3ZCI59KeNJKSTTyyY/rBwuRK3gcz8qP+lv2NGVJPsewcUs2K2r8r0u4+LbOBpdYFIogbHk eswW/FZ/MXbwSup0EYiE6O9prtDhZUwmrk0jjrYZYTay03/rs3FZMhgXKsZ956tJBPbnHqpThji UZnFGHa3GptOuf8kbtbk7e7FaWYnj9oAkhVDyGzQ9GMsVnJwhyKgKLIp7i8BPQGH03Fn2MPOr7D 17Tmj/LvERJwoxzqu/vzIIsn9nRkPQAYVcrWQlV8ZaAL0TaGer4P2CG5PSXvBmT4FGyeyono8kq lduUYtRhZy0wZ2yuCA4rfM5hwLmQtfZBslBHs6q1S9QqD3reLp4JMY3UTaxmss= X-Authority-Info-Out: v=2.4 cv=e9YLiKp/ c=1 sm=1 tr=0 ts=69a749e1 cx=c_apl:c_pps:t_out a=YrL12D//S6tul8v/L+6tKg==:117 a=YrL12D//S6tul8v/L+6tKg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=KKAkSRfTAAAA:8 a=prbQHjbDPxtVlcUdaJMA:9 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: yfvEAfUO2aeZcOZQGtyey0ulgY2CCbDk X-Proofpoint-GUID: yfvEAfUO2aeZcOZQGtyey0ulgY2CCbDk 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-03_03,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=978 mlxscore=0 clxscore=1030 phishscore=0 malwarescore=0 bulkscore=0 spamscore=0 adultscore=0 suspectscore=0 lowpriorityscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030171 X-JNJ: AAAAAAABmbzDcrHbdc4NUZ70zzgtoVvVdHPxewZU/B7dfGTIDUF+s6xbGP00TwDdsLr1+UgsPhp0FKgmnR6R4nB45khHtWZ4o+7WlHPQ1WWs5AS+IXo+B1eFqgZy7/OoEoJex6UB+6gxZBoEMOTLK9a//kpmf9Iz3+ykNsGrXEp9cbm0rXMMQzJj1RFYoVvPBDbf5RzrcNLomjkL2ruj2bbfNQogFz/6avslDa0cWhmO/IvlHxkynCmsJ8BgDXW6b9Kjz6lT7/0muwG6dUIP0wBM4bAMUMLNOaBucDVVN8pQISIe7uX5RUqhNzo2LIz2ssEUO3WaIo3woywRAnfjF3FwO4HEk3K8Re6HWdtmSS/hUzKc7KnXTee2DQf88Jhk27nGx+NP5uTAdlfi0xy6yn8EYSstNo0i3FhIZ+NkqGjWGprLi9E/3Bptl0yTuL0VODNchM8SjAjMmXbT0+zia6MieZwJiUW6tajzHSJ2XHEYBvOf7zGxjTi+YsEqVpab0VAEunLlvJoyV/TcG/qPuXvRyJ4yXer1/irw+r87JJss43PtrGCXkRlX30s59FTKRuusNcBs27KYK6ZVX6wPbRz60zKe1MMXOZ4ihs088a42CBkjEHFOSmD/W7fuIz2EffGDpimKec3g1pp259NLCAgPWXGrQHz1musuBdObfiwwMJo7lr3POPk3ZhTR1KvdXCkXUOiZL4rs/U+QNzhjqXxnH/RYZWla7cn68P4J0CbjvtcGjBhN+BXqYtEdgOhZEXekYvRAFpoCxFxQDwQ3MN0= 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.78.216; envelope-from=mohamed@unpredictable.fr; helo=outbound.st.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.322, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.141, 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: 1772571191246139100 Content-Type: text/plain; charset="utf-8" From: Pierrick Bouvier ../target/i386/hvf/hvf.c:476:31: error: use of undeclared identifier 'cpu' 476 | X86CPU *x86_cpu =3D X86_CPU(cpu); | ^ ../target/i386/hvf/hvf.c:479:24: error: use of undeclared identifier 'cpu' 479 | env->cr[0] =3D rvmcs(cpu->accel->fd, VMCS_GUEST_CR0); | ^ ../target/i386/hvf/hvf.c:480:24: error: use of undeclared identifier 'cpu' 480 | env->cr[3] =3D rvmcs(cpu->accel->fd, VMCS_GUEST_CR3); | ^ ../target/i386/hvf/hvf.c:481:23: error: use of undeclared identifier 'cpu' 481 | env->cr[2] =3D rreg(cpu->accel->fd, HV_X86_CR2); | ^ ../target/i386/hvf/hvf.c:486:31: error: use of undeclared identifier 'cpu' 486 | X86CPU *x86_cpu =3D X86_CPU(cpu); | ^ ../target/i386/hvf/hvf.c:489:11: error: use of undeclared identifier 'cpu' 489 | wvmcs(cpu->accel->fd, VMCS_GUEST_CR0, env->cr[0]); | ^ ../target/i386/hvf/hvf.c:490:11: error: use of undeclared identifier 'cpu' 490 | wvmcs(cpu->accel->fd, VMCS_GUEST_CR3, env->cr[3]); | ^ 7 errors generated. Signed-off-by: Pierrick Bouvier Reviewed-by: Mohamed Mediouni --- target/i386/hvf/hvf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index a70f8461b0..c0d028b147 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -472,21 +472,21 @@ static void hvf_cpu_x86_cpuid(CPUX86State *env, uint3= 2_t index, uint32_t count, =20 static void hvf_load_crs(CPUState *cs) { - X86CPU *x86_cpu =3D X86_CPU(cpu); + X86CPU *x86_cpu =3D X86_CPU(cs); CPUX86State *env =3D &x86_cpu->env; =20 - env->cr[0] =3D rvmcs(cpu->accel->fd, VMCS_GUEST_CR0); - env->cr[3] =3D rvmcs(cpu->accel->fd, VMCS_GUEST_CR3); - env->cr[2] =3D rreg(cpu->accel->fd, HV_X86_CR2); + env->cr[0] =3D rvmcs(cs->accel->fd, VMCS_GUEST_CR0); + env->cr[3] =3D rvmcs(cs->accel->fd, VMCS_GUEST_CR3); + env->cr[2] =3D rreg(cs->accel->fd, HV_X86_CR2); } =20 static void hvf_save_crs(CPUState *cs) { - X86CPU *x86_cpu =3D X86_CPU(cpu); + X86CPU *x86_cpu =3D X86_CPU(cs); CPUX86State *env =3D &x86_cpu->env; =20 - wvmcs(cpu->accel->fd, VMCS_GUEST_CR0, env->cr[0]); - wvmcs(cpu->accel->fd, VMCS_GUEST_CR3, env->cr[3]); + wvmcs(cs->accel->fd, VMCS_GUEST_CR0, env->cr[0]); + wvmcs(cs->accel->fd, VMCS_GUEST_CR3, env->cr[3]); wreg(cs->accel->fd, HV_X86_CR2, env->cr[2]); } =20 --=20 2.50.1 (Apple Git-155) From nobody Sat Apr 11 23:08:12 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=1772571119; cv=none; d=zohomail.com; s=zohoarc; b=kbbxEHteepLbSW6ukYI7t1j5GTa9BpSf1PK+8Z6rKKMguFaWLzyDAoJHHz6vcXOQ7prFIk5fHCDIqfHB7DUZoCyGX+3eXxt7jcdGknYb4zgHZfLK6BB01GmKx3kbkoy6GF3fE1T5ELecb4U2EwZKi44MRcRfRV5ILBtr1BVlevw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772571119; 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=oIw41w7SC3HlRA3Ydznf8qTGgbtqJDCybreQBLRku0MxTr6XAUCr8shkta1vU9MPrNVGx69obTCt404fss0Pi1vcYlZunk2puZvinJULavXEOPKC4TymgedR1vDrGzPTVEPizFODQg2iFrmfNuJQTMi+909HeeukC7qE2j5joos= 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 1772571119944879.7813919446938; Tue, 3 Mar 2026 12:51:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxWii-0000DY-Nj; Tue, 03 Mar 2026 15:51:56 -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 1vxWig-0008Rv-5v for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:54 -0500 Received: from p-east2-cluster3-host3-snip4-7.eps.apple.com ([57.103.77.158] helo=outbound.st.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxWid-0001Ww-WB for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:53 -0500 Received: from outbound.st.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPS id 6F3A51800677; Tue, 3 Mar 2026 20:51:47 +0000 (UTC) Received: from localhost.localdomain (unknown [17.42.251.67]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPSA id D15121800642; Tue, 3 Mar 2026 20:51:44 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772571111; x=1775163111; bh=mLmxlRPFcwMxrG9myQtY85BdAdnRcI/En8EyLObKCOE=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=VrYoMk4F62RupsHsJSs8Ldi2wsK6j+PqBZ44C5jsFziF0wIXe3VppAxEWUBff6GxhaZqUuEP1REsCqT8VltXH42BdxNX50aiZ5Sp3wBF4lzzgBotRSFsWyY73Nrvb8Jpxzo4fxN2XxsKDB1SnAXfLp5JvTYpuwcSAmxck3dMm5tC0/oKu3Ea1eGgq3D1eA4yu5VKrIxcU8ozMVUTEtUAEgZjmTQjQNjnCWYXC0WvzDjU+ea3s7s+fjr3P5j+L+gjASntH7UQILAoe9EhXfvmfwTxxMuj5GMK2Vum87jXj94QsMdnhmWcYb/SfCWxp+9/fH1Gkwndby3CTYC0t+R4Og== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , "Michael S. Tsirkin" , Peter Maydell , Cameron Esfahani , Pedro Barbuda , Wei Liu , Zhao Liu , Roman Bolshakov , Paolo Bonzini , qemu-arm@nongnu.org, Phil Dennis-Jordan Subject: [PATCH v4 2/7] whpx: i386: do not enable nested virt when kernel-irqchip=off Date: Tue, 3 Mar 2026 21:51:33 +0100 Message-ID: <20260303205138.32450-3-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303205138.32450-1-mohamed@unpredictable.fr> References: <20260303205138.32450-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDE3MSBTYWx0ZWRfX/XIqEUZWlUaR dRbAYBERSOrCkbLBI8q2w9tM5gfExkmGZaSi86FHF1SkROqHisHAH0dfooxop0ejulJi2++33sz ExuK4rTYCIeesS/r6/oPqS6hKacm+asLBNvMQttcuZoAjlS3bNVHtAkyyWWQE0I6wylYQJREzsO 4hcqTvV9wPdWtvmvWu1lv8rVtpI+HLNYVyiohowJ5f/FVaRcXN1FLZZbApwjZmW3evANncYaiM7 gc/gNMx3RYc8g20L3/GRZ9CZEAM3hpO8NhObQ3mDPh9vghYDEzMfPaB4s3ubsoqQu1ul1LMW6oQ zTlbwcx1YJoDx+bGaf5HalI6HBw27JsDgHZZ04Aq+93YuvH/LorF1RjMzybahE= X-Proofpoint-GUID: gxuYQkQx_dfxa0gv5iGHHDCiXRGgWjpl X-Proofpoint-ORIG-GUID: gxuYQkQx_dfxa0gv5iGHHDCiXRGgWjpl X-Authority-Info-Out: v=2.4 cv=EJALElZC c=1 sm=1 tr=0 ts=69a749e5 cx=c_apl:c_pps:t_out a=YrL12D//S6tul8v/L+6tKg==:117 a=YrL12D//S6tul8v/L+6tKg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=eKpLbWQDCUPTAuIwU-0A:9 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-03_03,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 spamscore=0 suspectscore=0 malwarescore=0 mlxlogscore=942 bulkscore=0 adultscore=0 clxscore=1030 phishscore=0 mlxscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030171 X-JNJ: AAAAAAABY0kYsusfRXOudXBTUFL7QfousACSEOKiRtJXFWRNOFDIgjz9Jc17ieQKm0xUVRd+CJGxC27wf2QWcYoqNr0LtV3eG2ngaUmT2fABJ0UCfOi2lAPi8FUOVZniBHDgVZhiQuOgdYrD1ZBbE7oEeUCZAAMili6OQ9p/TnPQE4IdnBrXLrsvG51aQy2SMiIhYyo+dT+Notc0IMaBOrMq4JEL0M8LrXhPEIOm73LpB4SEwetBz0l62pp1T3ZbC92GApH8rhMQdIK7j8eEdbufqSSTocOHlA2JJuVh+QlhL8+ZhCinxyw5WyoZLUImAwuuX5HLJBWgiShBU2Nd5uY8eTkjjIZmBo07Tos2XYHDaKONY57k9v9MPoK8UVkc8wa+h5haxI418bAddUZHxPe9VV55sa7q+QXJPGs2bewLBjk+w+PpSeP2nHoJLWGZPS17GT19P9Rl17yCbG38aEX8FVNkJQ93JhpJSiJxrgtuYp11NRopjmNeuH6ehQ9hwrXj9k0T7WFwt8YN2Af/IJbemE+uqCuslOplwrpQI92wEa6gfmc/tQwY27sEG3i6fEtjnHPTzODD/lpxQSLIjsA03JpSR+saSqBsogbN/D4vJJfVsJOCcd5g68CizQ/9XDATvO4+DgX7P9k+B7EKuzg3seoq8Ea37PPsIPW8uTImF5DmY4/LtDJcNwSwPHz0zGPZzCHd1fJI2D+D3C097rIUJnghcLEhlxSwA8iFVE76tbsdvU//BKdHRKeWuCcBIxwnqhQbsIil424TUQ== 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.77.158; envelope-from=mohamed@unpredictable.fr; helo=outbound.st.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.322, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.141, 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: 1772571122433139100 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:08:12 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=1772571182; cv=none; d=zohomail.com; s=zohoarc; b=PNmpzJy8vJIY2FC0UhrNB3YzGPW3V9W26nQCkYbRZVdfQ8z3dkrNOdfETDBg1C3DPasHAzZslXC5XEJP1p8Mfdc3ZZygqjYan4AvTV7xJFJXDG+a2NinzAFbd3X71urLzRl/wW/+jyP6l3qPYPy9Z7AwATcMulE0c6sL6mYMPjw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772571182; 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=lrpAOd5e53bsxT1ajpfI7uHJ9MsFxaw7zC/zzcGoC526XDDBuU0w78bdF2U6HS68OIbFP49P0rmhvwMMC58+hA/AM1sH4xHb68GmvS+Xh/VOonC6LPqU5hHMhGDaOjW4hHDKphDuqic2M6g1T9XlyKRLH0ac8ptIZeULG+RcThQ= 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 1772571182487903.795416565979; Tue, 3 Mar 2026 12:53:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxWim-0000cV-L0; Tue, 03 Mar 2026 15:52:00 -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 1vxWid-0008JF-Qa for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:52 -0500 Received: from p-east2-cluster3-host3-snip4-5.eps.apple.com ([57.103.77.156] helo=outbound.st.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxWib-0001WA-N7 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:51 -0500 Received: from outbound.st.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPS id 711A61800140; Tue, 3 Mar 2026 20:51:48 +0000 (UTC) Received: from localhost.localdomain (unknown [17.42.251.67]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPSA id A1896180065D; Tue, 3 Mar 2026 20:51:46 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772571108; x=1775163108; bh=gBxNQ3TjAYTeogiJbh69cd5jTUQ5SWnQGrtlwC8PRBY=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=feYb3wJb3G1znL26OULT+J6QWRYfVA1mMCfng2vtH6SpoxWLgzVTu8Tu6bhDn7VuMiWPEYPcJQ7udCYMH8Yluk4XhABRvRGXIuDBxA4mMMYYYzW7ErvbzGEMif8tfwEF/RwDs31dKZJWpsYi5FHmmUmukHb0O6E5gJZmvIOod6PkzVqlEDPVdnF6qiJ3kAghyZ6LcaHa6xb5FYV6P5YhsqZvgVJxEsQNMv9Ml6FccgLMjLKH/Z19F/FxI3+6sEILpklsBIs8VYs1HybTCDs2p9PiN2/KY2LXRh0acCWLN07zUJQgy2XMatoW9PkK71B3jRCjF/qh0gwM0L7Mt30ygw== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , "Michael S. Tsirkin" , Peter Maydell , Cameron Esfahani , Pedro Barbuda , Wei Liu , Zhao Liu , Roman Bolshakov , Paolo Bonzini , qemu-arm@nongnu.org, Phil Dennis-Jordan Subject: [PATCH v4 3/7] target/i386: emulate: LA57 fix Date: Tue, 3 Mar 2026 21:51:34 +0100 Message-ID: <20260303205138.32450-4-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303205138.32450-1-mohamed@unpredictable.fr> References: <20260303205138.32450-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Info-Out: v=2.4 cv=ZN3aWH7b c=1 sm=1 tr=0 ts=69a749e4 cx=c_apl:c_pps:t_out a=YrL12D//S6tul8v/L+6tKg==:117 a=YrL12D//S6tul8v/L+6tKg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=AJrqCOfVdMXzVqk_6-kA:9 X-Proofpoint-GUID: 56s56PR42YWj-Xmplcibw13BhcL05A1d X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDE3MSBTYWx0ZWRfX469etj//BEv5 PxAmjr1qZAcIb5DYnsPqVUzpiyYw8FHoZEHNnjt5IswyNIokwK9Rsqg2zJzHaOFP0m52tf9KlqW n3axp0H4rxNgouGYzhm3MVB5/Vd8gIljsLlQNZsfZJNDBEBkYmGqMrozX0kXyMZOh2fjGgJVMmP n9OsH3fbdamAD6PdtnXvR4Tn154VcEACgjCUi3KwAA2NG+NqhNmAX/5XK7hbRCqn45D5mtgKaGH Zb8uazGjuaEeS6Yiew2yxt6UXqcnH7pqRTOA424+pZ+qx2LQb7D83V2TgBMU2Wc9XrOukyjhc31 XZ2ReY4KGbovmTdwLRmQBM5OlKKhTAR06qbWHUGaeBkkAIrd7HpCIeyXxxlWpU= X-Proofpoint-ORIG-GUID: 56s56PR42YWj-Xmplcibw13BhcL05A1d 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-03_03,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=896 lowpriorityscore=0 spamscore=0 malwarescore=0 adultscore=0 suspectscore=0 bulkscore=0 mlxscore=0 phishscore=0 clxscore=1030 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030171 X-JNJ: AAAAAAABmkP7pxwbdG1+Uv7CmH8hLdgQGOdsuEYrfqNdAzjptyRX28gOiKObnRhdj/OkFfZHg+RCXYr/94T+mPgCHsM8OAMsrIP57mfMCWXyscXNXuALJDeTKM3E+00QvNFlH6Y821LZzqFFJLkTLSxKhYMr+weIZxKfg1KMdQY8tMUarW3gliWbk3q5F5GtTmuYDawfnDpUa1QiUnC3RYLbYeYm1R5BEYEbo0tr8ySydUVZGpG030RhjeI5iASSfqBfhhmLrOSwiIxCRzsjGQv9Wm5p+50Y7g0Ms3yg6yYsezV0sDtcStM63UKmT7XnIXgG24EQsfH40vygEr6+Z8/nJksZqdJzvSZ5XayJvCcnNQ2vzBo+5AlnlgTpVstOBk3dYkcQoMg0ZY8pXPLESn43ZsNHdsnyQzJVdgoCrmlvsikVOBv9wMUW8zLOntGN5vNTlBI6dgfIVnTdC3ToqWuBhp7SmBXbTGciEtkulGObCKjaJ8OE+opT/gb90kEyeyUbHsj7PRrhs4OKkFtTc1hmnvrfVyDRx0QsWJ80b8q+yMmxwU+mNeOqbntfq0bVbSVpsHWOKt8F4dsS0NIZh1Iu0Q1fw2YrgtnUPl11Yinonq8Iy1/p2Gb6fS1UfSK6Zn8KW3jhXEgu7IzMtLfGAiz2YlaKyyYl2OAl1VXVPpFvd4uk3ujy2Vj6teg6khKYY44Q8GnMvFbhbl2g7XQVomHQ3FWbQAuxMR4lxXcCDyJVM5NR3ZEgUL3S6Q== 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.77.156; envelope-from=mohamed@unpredictable.fr; helo=outbound.st.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.322, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.141, 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: 1772571185224139100 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:08:12 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=1772571178; cv=none; d=zohomail.com; s=zohoarc; b=gKI79O0jYOXmGs5H2jVdWPXPp+Ag+cSXCp9udnTBpAWNRcd1S+N7ORvFnxMPVJBnIKXb8g/fCs/Ju9Ys8IDlPSc4eR+PU6Xoq+zSTEXLF4QyM6rQf08Azk7rK/v9a2KdRBjuahSVHZ1v6OYBg6UdOfC/UIAIwTCPwGQzPlabMzY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772571178; 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=l5oo2Javbwb8mV/9bp8MZdx9yDaSBIBnQxynEbm74yap4XOKimA7Oxz0d6f3GMq6fdRAULIxWxo4eNG8Fez66dN0/54V7iG3UbdFwMCx0GYQRYDfIXsM6zCyoMKm7DPb5oECgSsDSJJU/dWDxAFeOrlk5Susg6atiMbDyIAjOdU= 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 1772571178917569.0883398541918; Tue, 3 Mar 2026 12:52:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxWio-0000wL-Kz; Tue, 03 Mar 2026 15:52:02 -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 1vxWif-0008Nn-4L for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:53 -0500 Received: from p-east2-cluster3-host3-snip4-10.eps.apple.com ([57.103.77.161] helo=outbound.st.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxWid-0001Wk-JO for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:52 -0500 Received: from outbound.st.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPS id 44C781800145; Tue, 3 Mar 2026 20:51:50 +0000 (UTC) Received: from localhost.localdomain (unknown [17.42.251.67]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPSA id 7CB7E180067D; Tue, 3 Mar 2026 20:51:48 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772571110; x=1775163110; bh=3JX8beg0C2Np1egU4bEnkRFyLgIrgwrt1tvpx/K3/Vk=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=JGMWq1PNUtMY///gmSNqu/0NzeUr88R+vrUSDQjZcOHy3CUZRbQsvorhFPeJTkPv5txUo/aI1NtWV58E0ZGD4pLX9N3iZWPUcIOlGIGGHquecbFjKHVgzmeT5Nw1xe1JLFIxaVSUF2I32g0Omjp1q9qC+V4y9+6RXHOUHPj7A9cxx62DLJm2O7ZcjrEMuOex9N/dPL71ofXiuQxovRdIf/T0RzqvAuMkN+GE5E5DJ0hMBp8Wh1CjKJg3KsjIf7hbhu+KFPWFu0yNLF8IxyyMutr647N2nAuFx+neP4sBHcILmMPsDAgk53mD+mEqSFVkcxN90ojgEP3DzWKH76bu2w== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , "Michael S. Tsirkin" , Peter Maydell , Cameron Esfahani , Pedro Barbuda , Wei Liu , Zhao Liu , Roman Bolshakov , Paolo Bonzini , qemu-arm@nongnu.org, Phil Dennis-Jordan Subject: [PATCH v4 4/7] whpx: i386: enable some more enlightenments Date: Tue, 3 Mar 2026 21:51:35 +0100 Message-ID: <20260303205138.32450-5-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303205138.32450-1-mohamed@unpredictable.fr> References: <20260303205138.32450-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: Qlz8N8iC5rKWOI3_PXFhXhIIFhvtyi7i X-Authority-Info-Out: v=2.4 cv=G70R0tk5 c=1 sm=1 tr=0 ts=69a749e6 cx=c_apl:c_pps:t_out a=YrL12D//S6tul8v/L+6tKg==:117 a=YrL12D//S6tul8v/L+6tKg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=lWQTlSF5RC17BzGQrLAA:9 X-Proofpoint-ORIG-GUID: Qlz8N8iC5rKWOI3_PXFhXhIIFhvtyi7i X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDE3MSBTYWx0ZWRfX5/rl+jpO54Jx 71ZIo5ds863r0wxxW6j6F3Quej1qym2vbX22fl9yYMRbWgTGEd2z/zJMZviJy3XcvGp/SKpSA6q HPyzUlPL71oT2TfhzKEK61XlD0Fa/XX3wcBq2MoUeyX+uS0+wiI8o9E5SIolFBMFc2cKnpmYTGn 4D5+KHYt7my0u+8Vl7YqbpnpD/SHgOsCHkPg3dmBUhC3S003extXYmXqbKenEEyLiWEE2sXYZSf pIvy6CGlVfa7XtoVrj209dyT1KOxSKUoQ+q2D6s8k4oSFfAV56uTD9OfNVEiP4vGkr1lFNSgom2 9p/iO4fbWMZ4xOPk4EOkRxcry2+VzKMNT169kZesOCUCcap7myI71/ip32OSGY= 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-03_03,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=875 clxscore=1030 adultscore=0 mlxscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030171 X-JNJ: AAAAAAABaWGhRZcNSStfLgU2Ga0SV5fSMr807oYa0bAw011QgiYP+09DU+YjIIDnFjGGIiw5JIRZJbRTsKVfTkQ+M/ruDKKawLIOy9KyKkbFclktEQ/kXE2Na5Pic5BVv7Hz2S61TPH28x9inpUkkPWESaFkCK2UNwh8gvgnklHKqIJ1SnYLPrKjUbdQIDsWiViwMXkJH8hUZFQCQ+SbNCwkrYiag+LnQw2Ftcbetyfc7QOYXq7TQhy9EV6W49rg7vZkceCPIeEznGM5VOC5Ik5xtEU8B/DfU8I8xGN1B5blxKnGwInAs3vREjVOK56kiqko2350P3/pqbwFdKUvmdYYKzSuCDyvQ6z1mvQ5tT7ogsE1ggl+ZQjFyQWS0PxQWuOtUa/uFhjmWAX7Ggx3HphyJnI6QWO2GUQ0uAIX0WJM4adsxLvRdQyAt4i19YeIenkgG7POq3b+9COBUTG/UCaU+j9ZdKAugzEIQaE7sD6a10CH8tIw0+cttjZCmlB5bf5WeAjreMenWbc1fjA8EbG2rjMZVgTxGwvF7qVYGcqqOVvVzowbk0+AbJ5mtjSd5ndhtRYrjsHIqRYQYX1Zm3ajtV6o4BwN0TE6VPZHSyJnQlw8XcRlEnw/95FG9IjQqeT17K0Ft8E1l6xFbY8Hjx57nvBNyOsU6El5rVwYLuhtxAQpaHwpgclnPfKsMF2VFn/znwgE6Wjdwsm/rqDE313gmrvJch/6WNDTMP8Z5OMWWrB8ZxSiICOWoSZTEg== 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.77.161; envelope-from=mohamed@unpredictable.fr; helo=outbound.st.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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.322, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.141, 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: 1772571180084158500 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:08:12 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=1772571190; cv=none; d=zohomail.com; s=zohoarc; b=LFKt4R4P85bo2xBLZqc9m318rPK5ZeXPdatQdkMCea66JJYRd7N7JriQfDXSa7+rVgrTZqOw6QyMgFPTO//3HpNTPSW7BrKW1i6I1lPOK+2vRgLy9F0Cyub3UgahxgkHSGml9Rql9F/6qur4wap82DQVWKekQN2hsGJXY/nCthI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772571190; 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=Y3JlG+z3H9s3sHt/x0Tuo8JzSDhUpyc6A/I7Tj0fIfs=; b=NHQTsQGRzj8IUOO6Z2J0S/h/rZ4vyRcSe3MqP8pOQt7RjeMNj8OQGUsna9QPQMoIh3DOo1atMR+llns6YYArBQDGe5in3Hw057zDbIjlv5b/RjcjT7Cc2u3bJgQZQQBVnkaFpR56ifkuNiDcfTtR2hlml+sQxQ41jqYzD7pHAlo= 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 1772571190169274.26156300183493; Tue, 3 Mar 2026 12:53:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxWin-0000gv-2k; Tue, 03 Mar 2026 15:52:01 -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 1vxWii-0000Bu-Ef for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:56 -0500 Received: from p-east2-cluster3-host3-snip4-10.eps.apple.com ([57.103.77.161] helo=outbound.st.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxWif-0001Xm-Tf for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:55 -0500 Received: from outbound.st.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPS id 18C4318000B8; Tue, 3 Mar 2026 20:51:52 +0000 (UTC) Received: from localhost.localdomain (unknown [17.42.251.67]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPSA id 4F6D7180017C; Tue, 3 Mar 2026 20:51:50 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772571113; x=1775163113; bh=Y3JlG+z3H9s3sHt/x0Tuo8JzSDhUpyc6A/I7Tj0fIfs=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=XlnWnInLNCMQxVcZpbAZ6VU98tEuKvEWU430O9JNlxlQBLGHbEPvfqXY/FAzT1fTLIUZ2eg6LnUuaere9bIOyHc7IHq5ibIaAcHLLYzsGX6yKeR8dk5LvOOF/j+94BkQSCYF0bHyjp1d1wJzUpRNo3TpkxuDCWvFb9Eohkxp5Jh9TK1FC+sDMh0yoXXyFtv+RpY6VQMO/K6CZUmHvydJyphEBuspsT5+UgoqI9FZw2JZsted9nJWw7hm/OUkD6Kfr6qb/cB2bJz7j1nhjnxaQsf9GYbLF35XcwgxFYZ/v2kg03z3tlGG8CeMuPRBViGQLc0Z5qVb7pEwFyJWQ+WaFg== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , "Michael S. Tsirkin" , Peter Maydell , Cameron Esfahani , Pedro Barbuda , Wei Liu , Zhao Liu , Roman Bolshakov , Paolo Bonzini , qemu-arm@nongnu.org, Phil Dennis-Jordan Subject: [PATCH v4 5/7] whpx: make Hyper-V enlightenments configurable Date: Tue, 3 Mar 2026 21:51:36 +0100 Message-ID: <20260303205138.32450-6-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303205138.32450-1-mohamed@unpredictable.fr> References: <20260303205138.32450-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: J0rW0WKa4PVhX0by892mbCOvlyuabVjV X-Proofpoint-GUID: J0rW0WKa4PVhX0by892mbCOvlyuabVjV X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDE3MSBTYWx0ZWRfX04qImjl1Wpt1 QAnwGUQ30ISEz8FOy+1N7Q9CFB/87PXeIB7IUhmsFtoScmi/44T+qfA0oAsFGMuv7wZHMsLsBG6 nxDlFhSrSrRKp2jm/kaQbOpsKQiofF2Mc+Sc9d6NNGPfy3P11GqO8ofHxYcToxrKmmwYJWWoBIa EpFwt4zIVertktN7hMHeA7NF/SDpYZVqxRiWl+kt8lol8KxUr7ixwyxDNzuiFDndsSpo4Qil4tm urhxUC6blHIh0wI+dN7t+cWCrwHIpUWSghjIhMAkziJCT4iZc0MHJL8jTxrNlccwDdOwN4cjTZl LAfrBoi1p/G2BQQ0ghe8tSUBOi52elruBHsNVRUxRrXYYZNSU404hEAEQmRlHk= X-Authority-Info-Out: v=2.4 cv=CdIFJbrl c=1 sm=1 tr=0 ts=69a749e8 cx=c_apl:c_pps:t_out a=YrL12D//S6tul8v/L+6tKg==:117 a=YrL12D//S6tul8v/L+6tKg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=BRqF0JgGwH6LvUrOcfoA:9 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-03_03,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 clxscore=1030 suspectscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030171 X-JNJ: AAAAAAABAfL/pbksfYhk2CWS4rGUEQAEpgt+zteoTBKb+b1GdqBWU0juX0OM1xWTS8nxbfUVSPWCXLr/duCm3p5/ArrM5GerpfKsWQU8T2FlzPqpQoQbujLKnL8fByCvE7QdnC3SD46mzxg0QGuiY1Pp7IdYgalwtrKEH0s0UAy3ENLn1k0j/ZqNMVLPaywxT7YTy10FKRqLtTI54v746LZCyZanFo1+gPHm465u70B+tGqrUjSm5B7x1iYw4n6+FsefLCvEfrmzXG9cmYqY4vQjEFUqjpTNeqjNErpaWsgLoqDVTmhiXzKL34p3xBpd5fql6h3B2lc2yPs0JzNntqmM5CBZPkPr6xx2KRUSyP5H0uM6qePs9pzhBWq+opQmL0jQtajfUCTIoofMJSlf+pKWpfZfR6fGcu7CHdNnW/9HrF3RYLU5RvvSey5wlcom7OvajhavQ/5kjKMeS5DpZFiXzg1uHahkpzzlDCTXy/zNjuwjeXlTJGTdCu0O40WlMYW+KlLffnDSXgdX0mhMnX35zDTJuOoq2aXwKA1c3MF2ZgBxlCgn6jCwMD8vqWzMQnj4ST7nF72lSkOs0nLHBM184ZD8mGGg8iIcvAtVzc55GBTLuFxNax2Ylzy1m1Zc3ARBpnEeA+bhY+X2V4fYAM5qSDgeLETKpnn0Ai/jXwD3h/EP2C8AmXxm5kstCIup5hjTf2Wkb6yWQfAbwK0KiGlm+Mf4bFJCQLVGjuLbQVIsNnqcxUj+2LKxGCKYwqQBuSp0hw== 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.77.161; envelope-from=mohamed@unpredictable.fr; helo=outbound.st.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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.322, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.141, 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: 1772571192055158500 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 | 44 ++++++++++++++++++++++++++++++++++ include/system/whpx-internal.h | 4 ++++ target/i386/whpx/whpx-all.c | 20 +++++++++------- 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/accel/whpx/whpx-common.c b/accel/whpx/whpx-common.c index 4863fc8663..dae9ff0800 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,41 @@ 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; + break; + 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 +534,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 +548,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:08:12 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=1772571168; cv=none; d=zohomail.com; s=zohoarc; b=Mr1XA2nrJnZJcvlErXZdDdkFZ1cBwaWfz4XMyU4y1NzQoLbtPXHCdZHpZltV5uPGNAiy08qJsBFSsnop0yV/E/Ce/IoVf0pj4DI6hKZMNPgKoEt7uD9rf0/f9LeSVnRavVkIVvS2ozLNKY58wUSV6xYTGeEhWQi5ocbozZkx0Ak= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772571168; 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=DwofeRqV9mct+mFkpNDuBDxg17rvc3YBR07pyqMDFAY/gd8Y5NY0Bl3q5GN4HRkuxkKSMj5RNsH61pjsUYvfnd/s6fWyEq7nUa9KA2rcozToMQlTlG3d9k82NJm9IpyC6XG1GrLWDlcZYN033H7iyg3Pu+pduvC9bxmjrbpc7I8= 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 1772571168583272.56732708217817; Tue, 3 Mar 2026 12:52:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxWiu-0001SV-S3; Tue, 03 Mar 2026 15:52:08 -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 1vxWim-0000aj-0i for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:52:00 -0500 Received: from p-east2-cluster3-host8-snip4-10.eps.apple.com ([57.103.77.251] helo=outbound.st.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxWij-0001Z4-I8 for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:59 -0500 Received: from outbound.st.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPS id 30E611800155; Tue, 3 Mar 2026 20:51:54 +0000 (UTC) Received: from localhost.localdomain (unknown [17.42.251.67]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPSA id 1FD3D18000BF; Tue, 3 Mar 2026 20:51:52 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772571116; x=1775163116; bh=OW8S3KLD8zFsAuvhuwhxPEOWPDp1M7oc2dpZI+SomHI=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=H8gnSy9JAVhaX4kwL6c/oej3m60o4nZgThsBksKIcZUNqwBv9sXEEibtujyUQnTJcBNqKuED2DfOYCGGcQ5FjoXtTDLQgJHRrLMmR2MIQusuiEo71zbfU1FdJG6tOdQ+11Nop/LJXWKfyl9QMUAJiOamvA0A5yRpcxtGeqkrNZug0MXkFCmQEX+pOTxHJ1tQ69ySKnpT9kPUqvyThCw/RzjFwTEikoWH754zy5uCIF26cYp/tkkrnx3uvQxh5LQDHO5zZLGKXYRfDHA9PCacrP/TNzpsHDIHvvqft+M2LAazA1qqp6Y1gLkvk2SNBesVwJG2Ffj8/dOxyLn/1xaM4A== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , "Michael S. Tsirkin" , Peter Maydell , Cameron Esfahani , Pedro Barbuda , Wei Liu , Zhao Liu , Roman Bolshakov , Paolo Bonzini , qemu-arm@nongnu.org, Phil Dennis-Jordan Subject: [PATCH v4 6/7] whpx: arm64: enable enlightenments if asked for Date: Tue, 3 Mar 2026 21:51:37 +0100 Message-ID: <20260303205138.32450-7-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303205138.32450-1-mohamed@unpredictable.fr> References: <20260303205138.32450-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDE3MSBTYWx0ZWRfX8Ab4EquRAdeQ lMThy272Fm5pSYE5DRZAktcxZtNGIlwUanKRkJ+vjueY2JQBj/AVduTL8dDTmImVdMcU9OVNgMH YL8i4q2RrkDGY2uROWp+A0HAy525lZaDe26loDliw/Jd5Pf+YiXwcx+7laVdWclSPWaFGca5qWC W/hyjaU+x5o3WeZ8viLJFkp5XPo+JqK2GK9LjWUjjkFyTkpxTV06KLyR0WCwg0I7n23hGasIm6v ZFfArtWZ95ckPPU08Sks9WmgKtH5632mp4ySHBID/F2FZ/Ho7ozwanHn1Nt0BSWKq4YBC1QL9Ac JpQl7Forxrknly/7FJ64pGm9DloDM9NOg8QSUJ9WIFGt1dla+Pv+caz9tN9qLs= X-Authority-Info-Out: v=2.4 cv=HoR72kTS c=1 sm=1 tr=0 ts=69a749eb cx=c_apl:c_pps:t_out a=YrL12D//S6tul8v/L+6tKg==:117 a=YrL12D//S6tul8v/L+6tKg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=rOdoSoqhRWX9tc6y9DEA:9 X-Proofpoint-GUID: kmdXcisEPhQx0014821iECwDuD3jUyCE X-Proofpoint-ORIG-GUID: kmdXcisEPhQx0014821iECwDuD3jUyCE 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-03_03,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1030 lowpriorityscore=0 suspectscore=0 mlxscore=0 malwarescore=0 adultscore=0 spamscore=0 phishscore=0 mlxlogscore=800 bulkscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030171 X-JNJ: AAAAAAABxNRVY+kqZi3Qme/fDrWPtv+FLN7Qhag+H6BisE3I8/nCtYj5noNImXmjoB4I2QFJxvF7sSZvnO/eiR4kAh4g65CwVNAcPEGok0NJTae+h3ze/n35ccYy+TGSSALHnEIKuqQCqJmBC8mlXW9fPEFnaKfm1Ekq/IfbWWAoaV7jn0+plOXAVbkqtuVU4XrrCz6sKQbLGvC5ajE3WV66asAE01+5Ek8sthRYpFpkrJu9donhIeqvzP57naCclHltY94z3QiU+QUwRM5HqlCHez/ULD3q8cY8H4P1Pgqjmh3GuBvq8CYeL74EgU6J20Jhp3l4xMEz9yPNmw79BQssOCQDrKYlLkFh9kOngCAq8NsvhgdpfxD7v9G2ckiTbqhKwFASGnI56j93jhhib0qxKr5wbo7RRGUBJpETg/jpU4THq3jnRfnyC3VUsWgoKTWlVG3g93Xhcr/THn0xY4Ta/gjbgamAtpKcN+6DsCELwodjAgWk3F703rIkn1rY7IoSrH4QWoVYz4g9rSuu7Ba9FwBzeniNM1yoa3qRlkJJR3LTAivUQG2k+jKKI5V4xo8u3imFPcvROQAzEuFMhgsNseJ0S/lPQfow5PYUadI5Sm/HwPEbTu2REAW11d4dZIB+RoBEliBIYA9mMUrbbjkzseazcEuEUZt+aC/548T1F+iF9DBasaU1UiZbe6P2YaVDObJZxqfvhwKCqxeQbmDsTUrTTXuLcc0PPOzGA9DEegr2983X4mp0+/BZdw4vw+aS 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.77.251; envelope-from=mohamed@unpredictable.fr; helo=outbound.st.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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.322, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.141, 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: 1772571171201139100 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:08:12 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=1772571182; cv=none; d=zohomail.com; s=zohoarc; b=G9e5h2Q2RAKjLDnh/+rwkCuzpjx2fe8yIkr66rcB82rEXX4EqPHcfgWMKE/w2MF6Tn5J0M2B9dhiZwPTnCuIa5YAaC3YxAxR3AkDPzzaCgrWZikZDdp5XfpEqifgSuNtnDr6q9ZurD8t7sJTbkhN3lD+A9RTudcpveYAYFNW7Ek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772571182; 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=e6Gk/Ir/cMfUSHXPkAEV3hd52/3hJLfX6uEc2N8pxheG6+I+MOJGpPbUoJApOkqflotOEhTCKC7Bo/6m9jUBWQbzrFnyiGOGoiw8HVCmgavL6Gn4++Qpc3g/Uljna/8WYqU5i4LDmyfmSKcrn9WMdt8K4PD69fyl6IKSBoRwyew= 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 1772571182780595.786861557675; Tue, 3 Mar 2026 12:53:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxWiq-0001AE-N3; Tue, 03 Mar 2026 15:52:04 -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 1vxWik-0000QJ-Ti for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:58 -0500 Received: from p-east2-cluster3-host12-snip4-10.eps.apple.com ([57.103.77.191] helo=outbound.st.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vxWij-0001Yt-7e for qemu-devel@nongnu.org; Tue, 03 Mar 2026 15:51:58 -0500 Received: from outbound.st.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPS id A90291800145; Tue, 3 Mar 2026 20:51:55 +0000 (UTC) Received: from localhost.localdomain (unknown [17.42.251.67]) by p00-icloudmta-asmtp-us-east-1a-10-percent-0 (Postfix) with ESMTPSA id E5A491800140; Tue, 3 Mar 2026 20:51:53 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1772571116; x=1775163116; bh=xfi6rjeDQo4vpSHmbqs0x+tY5PCeD7vMjLpTj63mmJI=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=LHeISDF5t80r2L7PR1D20T8FqS79BO8W2Bvk9QIiwkj7KLKBzcYe8LFglI7JHR1e3cyzqtZ5SSB19fmvMqZJuspxlQWnSPdZ8VTbubxAR0ByAOs6LFyxxsY+z4X8hlVUpdxw7KdbDhq2Ko00n1B66B7pszT0TICJi6Kr9UG5261BFUeo7jrgvADwLmbaunptDWBjtPXiHxrl7lLFjhCEG9qEO1V2y9kvSbRn0CRC99C6uM8l/2dq/ZEtr7MlH55Zvt66G2Ym6AxV5QficeaaDVGe9zrbiRKnlhw6fTaRm3nsVvSL5oUK+gkZMkGu2bbnFwax19thvZPj5qI0lEx//g== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mohamed Mediouni , "Michael S. Tsirkin" , Peter Maydell , Cameron Esfahani , Pedro Barbuda , Wei Liu , Zhao Liu , Roman Bolshakov , Paolo Bonzini , qemu-arm@nongnu.org, Phil Dennis-Jordan Subject: [PATCH v4 7/7] whpx: i386: remove SIPI trapping Date: Tue, 3 Mar 2026 21:51:38 +0100 Message-ID: <20260303205138.32450-8-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260303205138.32450-1-mohamed@unpredictable.fr> References: <20260303205138.32450-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAzMDE3MSBTYWx0ZWRfXxxtB4S0g5bBh nEY/z32AOwQzrWnqaze5ig39Xbx9HYM5meNb+wylfGnZh+zZq+s4iStTc6aw7THO2MgtVugZyD4 IahX5w0VZY3/5+dkdp+c4cgmTUnaBRgXLMR3kMeDI5ebWlTVx9L8RS9JWgCgngoYIbcOQOm8Tek OcA62nmZJgi6UBaPM7copeRk5m8M3sKaGuGuU2sKuT8w6+n2BjeEhUOyGuw3JDOiH2Fu1OsDpxb 5TdTCBUY1r9e4BubEgXbHm0Zlo1WJ1u/JtY4rgPa476YZrlIUki3SngGeOsw/IPkQt28PxqG7/W 1l8SJ8c0vjlcZUdgnOiLaNyZ5BKDtSokBjplFEtFshFavpRAhMEoS7ftXE6Gqc= X-Authority-Info-Out: v=2.4 cv=O5M0fR9W c=1 sm=1 tr=0 ts=69a749eb cx=c_apl:c_pps:t_out a=YrL12D//S6tul8v/L+6tKg==:117 a=YrL12D//S6tul8v/L+6tKg==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Xl7PRCIL3n5FuX7mVuoA:9 X-Proofpoint-GUID: nQr99yVM2CSiZzKeQSQ96gK0C00SdciK X-Proofpoint-ORIG-GUID: nQr99yVM2CSiZzKeQSQ96gK0C00SdciK 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-03_03,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 mlxlogscore=997 clxscore=1030 bulkscore=0 suspectscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 adultscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603030171 X-JNJ: AAAAAAABNRwAgybmiFV8Bc0ICbK5hLfau9bm5dOb5NgIby64Ax5bWi2RW+gJp5vgD8o11eVVrjCMw9ZMU+GoK4DRY5vdHjPT5tI8lnhPgkO/5bys51eCZa5le6fkqK3fHY4V0pviLq08EKwnMQfmiIyoH9fb2LaQb6yR+NwqPIyxqbrfPnX0HM0bOoxUmUHkQkvSfeiw19nZn50tMz2G3UC6aLbdZljJsOw4QXRQnqWFQarzh9UX0oE+1GwsqnRDNkoXe3abwuYh5ThuLvVfPF8XDaood5oNTYIKUcvrL42gXMcc522I8bS8vTu0aipXIKFUmTFt5CIUpNG+vejpWeEOUlNOdgd9Vo1Qvx62KQk1Xi66ylPcP+tSNv2VyJDMD4V8afwDfZWmZxnc+S47YJVH96a0RckT2+QySIjNmgReFkT7Xay5u8EibutDM8V0SP6kZBUzRlGhMO2wTx8Y3SpzzkozOkVM7NlS3lLqt5wn72zsw0M30rhMYNGA1FVcPEoH+KxTumNoqw8LiGofZXySI3JF3Kf29PhhNbSxjDOfol62QtA+0qorJktGCI5NGPgQ8JWIuaQYGzVqa2kXoFROQYHYHZ4rwUCNiHeoP+sAG5Gi5okAWbpa+Pip7YGhOs+lHZh3l8H783utn7t8QZtKL5pVPsyLvQrmO5X29eAJXEfHgn2VEUfGjJLyxDKkG8uxhpDV1VMn44H19QykKLZFHEQl4+xo4tYsA5dOZTu+TQOSvb+i+7tdcKAng6+MIlagW64Em6TSK9JF 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.77.191; envelope-from=mohamed@unpredictable.fr; helo=outbound.st.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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.322, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.141, 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: 1772571185381139100 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)