From nobody Thu Apr 2 18:47: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=1774567951; cv=none; d=zohomail.com; s=zohoarc; b=Vj9tUH2oaj5RTZNWueIyY3nAlaV6o/jUjE38rNCQXLzrPDUFadkEJ/byYA+ELkJMz2DfUWNoBn+ShRXBY3SaH613AtvKKlc2mzklWN3msaTNTb/nEUj4OaFePwIuiZZRpGZV1HZAzRi6ctyW60BbqZfFaiakCQj3Oa5EmHcfsrs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774567951; 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=ah7iVUifv115vhXY2mVssdsatbmluyAIZvG5NnZFtHY=; b=GHKQOSaM37Su+LbedbFGlCzo6PLF08ZCHeyglkEuWOY8ncCpFmRm2QtMNUEhbopXjfvRPJrvugRkKnZCRc2Iy/u+BSmPuq5jXwKBrMH4YHL/L9BiX5OYlx67s1VJHkGybJBQhuDTGEXOoYQSoBSHl/JHNtvNNWV9a7YM7ZXJIXM= 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 1774567951392167.71857662403636; Thu, 26 Mar 2026 16:32:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5uB3-00087N-Ru; Thu, 26 Mar 2026 19:31:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5uAx-00085a-TX for qemu-devel@nongnu.org; Thu, 26 Mar 2026 19:31:43 -0400 Received: from ci-2002i-snip4-6.eps.apple.com ([57.103.88.217] helo=outbound.ci.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5uAw-0003nf-2c for qemu-devel@nongnu.org; Thu, 26 Mar 2026 19:31:43 -0400 Received: from outbound.ci.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-central-1k-10-percent-0 (Postfix) with ESMTPS id 6DEA01800202; Thu, 26 Mar 2026 23:31:37 +0000 (UTC) Received: from localhost.localdomain (unknown [17.57.156.36]) by p00-icloudmta-asmtp-us-central-1k-10-percent-0 (Postfix) with ESMTPSA id 225CF1800236; Thu, 26 Mar 2026 23:31:35 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1774567901; x=1777159901; bh=ah7iVUifv115vhXY2mVssdsatbmluyAIZvG5NnZFtHY=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=Tz5HfwXIKj1h5B4TqSPYKrq8cS1172XBjsuaC0YNRv2IpzEiK8a5cko9nKvwmicnnvVXm3mUdU5tHa7XevS9ejaYrDLgynBQZZJzLJ+dX42alacgxXhxqJcrvRHxPpqI2TqOFIE6UuC9GtR8/dluiLPywr5i/+z7sISxji5WLOpbCX4mlnn9TfYc8jZIbxd9GtqVTcZsNLTGtmBa00GQ7Sr2zJhbwnByeU3IYMiDzBMf5RqKzMCpJVWyqFsosOaQNiQ1pdRVmgy99sXFZYFNhU2Zmgyi18FDthXeDUEF4ZNDqLCDkCFf+LaHhjnlD6xigDCgvDb/mJb/k3uBnQJGpg== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Magnus Kulke , Mohamed Mediouni , Pierrick Bouvier , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Wei Liu , Pedro Barbuda , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Roman Bolshakov , Phil Dennis-Jordan Subject: [PATCH v5 1/6] docs: add WHPX section with initial info Date: Fri, 27 Mar 2026 00:31:25 +0100 Message-ID: <20260326233130.59392-2-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260326233130.59392-1-mohamed@unpredictable.fr> References: <20260326233130.59392-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: TxwPNH8ePXrJI9Sfs_HhYHsAsC3lspQ_ X-Proofpoint-ORIG-GUID: TxwPNH8ePXrJI9Sfs_HhYHsAsC3lspQ_ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzI2MDE2NyBTYWx0ZWRfX/WOJCaqCBsoJ 3vV4eWEIV0OfUcqf8Tw9DwiWo48E/dYV29ekuJgcAHslSHQPGEZIjtJTYMpjfqVFJBew7BlzJ3x npwN5fIbSRn4eStHmSo4MZOgUTyiYDBU6DQBigBV2qRRsi1S6SR//wtHYL0fma2+OAGMGP5ykQe TMrrhcuA4/XpOHkVOSmNQ7XKhcKXgNx5xpZ6HqKDWWQsawT4d2XV2o/oM7oKGON8U0wADvWvqs4 p5LoFpxtlAIGQPChzkmmoJ4LX3b2GXI8UVrHV5g5HmVgrXSDagl5XjQoLXTDaDxmQ1eMoqVHGBR ++6ZuaQh6qM696ySYDdzna7UYCicKrLHSDG2knt5e8osPVkv7V960uM0ThnRAg= X-Authority-Info-Out: v=2.4 cv=If2KmGqa c=1 sm=1 tr=0 ts=69c5c1da cx=c_apl:c_pps:t_out a=2G65uMN5HjSv0sBfM2Yj2w==:117 a=2G65uMN5HjSv0sBfM2Yj2w==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=yMhMjlubAAAA:8 a=WaZvilOYPjjn8e_oVx0A:9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-26_03,2026-03-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 clxscore=1030 mlxlogscore=999 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603260167 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.88.217; envelope-from=mohamed@unpredictable.fr; helo=outbound.ci.icloud.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @unpredictable.fr) X-ZM-MESSAGEID: 1774567953319158500 Content-Type: text/plain; charset="utf-8" Signed-off-by: Mohamed Mediouni --- MAINTAINERS | 1 + docs/system/index.rst | 1 + docs/system/whpx.rst | 144 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+) create mode 100644 docs/system/whpx.rst diff --git a/MAINTAINERS b/MAINTAINERS index cd8ba14450..eb7132e39d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -582,6 +582,7 @@ F: include/system/whpx.h F: include/system/whpx-accel-ops.h F: include/system/whpx-common.h F: include/system/whpx-internal.h +F: docs/system/whpx.rst =20 MSHV M: Magnus Kulke diff --git a/docs/system/index.rst b/docs/system/index.rst index bb948e2993..4509630fa4 100644 --- a/docs/system/index.rst +++ b/docs/system/index.rst @@ -40,6 +40,7 @@ or Hypervisor.Framework. confidential-guest-support igvm nitro + whpx vm-templating sriov qemu-colo diff --git a/docs/system/whpx.rst b/docs/system/whpx.rst new file mode 100644 index 0000000000..2f906ec586 --- /dev/null +++ b/docs/system/whpx.rst @@ -0,0 +1,144 @@ +Windows Hypervisor Platform +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D + +Windows Hypervisor Platform is the Windows API for use of +third-party virtual machine monitors with hardware acceleration +on Hyper-V. + +It's implemented on top of `Vid`, which is itself implemented +on the same set of hypercalls as the `mshv` driver on Linux. + +WHPX is the name of the Windows Hypervisor Platform accelerator +backend in QEMU. It enables using QEMU with hardware acceleration +on both x86_64 and arm64 Windows machines. + +Prerequisites +------------- + +WHPX requires the Windows Hypervisor Platform feature to be installed. + +Installation +^^^^^^^^^^^^ +On client editions of Windows, that means installation through +Windows Features (`optionalfeatures.exe`). On server editions, +feature-based installation in Server Manager can be used. + +Alternatively, command line installation is also possible through: +`DISM /online /Enable-Feature /FeatureName:HypervisorPlatform /All` + +Minimum OS version +^^^^^^^^^^^^^^^^^^ + +On x86_64, QEMU's Windows Hypervisor Platform backend is tested=20 +starting from Windows 10 version 2004. Earlier Windows 10 releases +*might* work but are not tested. + +On arm64, Windows 11 24H2 with the April 2025 optional updates +or May 2025 security updates is the minimum required release.=20 + +Prior releases of Windows 11 version 24H2 on ARM64 shipped=20 +with a pre-release version of the Windows Hypervisor Platform +API, which is not supported in QEMU. + +Quick Start +----------- + +Launching a virtual machine on x86_64 with WHPX acceleration:: + + $ qemu-system-x86_64.exe -accel whpx -M pc \ + -smp cores=3D2 -m 2G -device ich9-usb-ehci1 \ + -device usb-tablet -hda OS.qcow2 + +Launching a virtual machine on arm64 with WHPX acceleration:: + + $ qemu-system-aarch64.exe -accel whpx -M virt \ + -cpu host -smp cores=3D2 -m 2G \ + -bios edk2-aarch64-code.fd \ + -device ramfb -device nec-usb-xhci \ + -device usb-kbd -device usb-tablet \ + -hda OS.qcow2 + +On arm64, for non-Windows guests, `-device virtio-gpu-pci` provides +additional fuctionality compared to `-device ramfb`, but is +incompatible with Windows's UEFI GOP implementation, which +expects a linear framebuffer to be available. + +Some tracing options +-------------------- + +x86_64 +^^^^^^ + +`-trace whpx_unsupported_msr_access` can be used to log accesses +to undocumented MSRs. + +`-d invalid_mem` allows to trace accesses to unmapped +GPAs. + +Known issues on x86_64 +---------------------- + +Guests using legacy VGA modes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +In guests using VGA modes that QEMU doesn't pass through framebuffer +memory for, performance will be quite suboptimal. + +Workaround: for affected guests, use a more modern graphics mode. +Alternatively, use TCG to run those guests. + +Guests using MMX, SSE or AVX instructions for MMIO +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Currently, `target/i386/emulate` does not support guests that use +MMX, SSE or AVX instructions for access to MMIO memory ranges. + +Attempts to run such guests will result in an `Unimplemented handler` +warning for MMX and a failure to decode for newer instructions. + +`-M isapc` +^^^^^^^^^^ + +`-M isapc` doesn't disable the Hyper-V LAPIC on its own yet. To +be able to use that machine, use `-accel whpx,hyperv=3Doff,kernel-irqchip= =3Doff`. + +However, in QEMU 11.0, the guest will still be a 64-bit x86 +ISA machine with all the corresponding CPUID leaves exposed. + +gdbstub +^^^^^^^ + +As save/restore of xsave state is not currently present, state +exposed through GDB will be incomplete. + +The same also applies to `info registers`. + +-cpu `type` ignored +^^^^^^^^^^^^^^^^^^^ + +In this release, -cpu is an ignored argument.=20 + +PIC interrupts on Windows 10 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +On Windows 10, a legacy PIC interrupt injected does not wake the guest +from an HLT when using the Hyper-V provided interrupt controller. + +This has been addressed in QEMU 11.0 on Windows 11 platforms but +functionality to make it available on Windows 10 isn't present. + +Workaround: for affected use cases, use `-M kernel-irqchip=3Doff`. + +Known issues on Windows 11 +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Nested virtualisation-specific Hyper-V enlightenments are not +currently exposed. + +arm64 +----- + +ISA feature support +^^^^^^^^^^^^^^^^^^^ + +SVE and SME are not currently supported. --=20 2.50.1 (Apple Git-155) From nobody Thu Apr 2 18:47: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=1774567948; cv=none; d=zohomail.com; s=zohoarc; b=P3m76F48OjdtljK0GFNEiT5BJsQA6ON1ia0rLPucDM5YuHykcqiS5GCTCjEKw1ERBKDf7QxmbPno5iWX0/O/E0cBVxvAVs/ZOWEwDxB7YkEv6tN4QFyEAmJlntZlOQl8Gz+bMJF00J2dyfSnLfKq+TnRPSn+T+8nxSu/hJDin2U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774567948; 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=FKSxblGBMJN9gDudhiJ4g/hzQy9Cx9uqiZTr40R8kdo=; b=cuTwFJQuhsjR4aaixl6lXhWFwCPibf1tU7WslwKK/uH/T+5nnRJqN6gUWHv4giL7P5UufiMZYBbHN3L9sKni6jwcgCG9AEd5Da8dPada3XoVNQvM0dEWgpbvZcTtRn2XJcYKDSJ7wHZImPrDZHZoaEbQs0RoCPYsaGKFexQ5GiA= 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 1774567948988289.99574333588566; Thu, 26 Mar 2026 16:32:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5uB8-00087T-5C; Thu, 26 Mar 2026 19:31:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5uAy-00085w-Ju for qemu-devel@nongnu.org; Thu, 26 Mar 2026 19:31:45 -0400 Received: from ci-2002d-snip4-11.eps.apple.com ([57.103.88.171] helo=outbound.ci.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5uAw-0003o0-9P for qemu-devel@nongnu.org; Thu, 26 Mar 2026 19:31:44 -0400 Received: from outbound.ci.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-central-1k-10-percent-0 (Postfix) with ESMTPS id 27F5A1800104; Thu, 26 Mar 2026 23:31:38 +0000 (UTC) Received: from localhost.localdomain (unknown [17.57.156.36]) by p00-icloudmta-asmtp-us-central-1k-10-percent-0 (Postfix) with ESMTPSA id EB78A180011A; Thu, 26 Mar 2026 23:31:36 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1774567901; x=1777159901; bh=FKSxblGBMJN9gDudhiJ4g/hzQy9Cx9uqiZTr40R8kdo=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=Pnj+oVH7TD9BLHkamFEX9/20PV81u+dhczWAqnTQp5XoF7IXlrFB7oyvdnN9WXZSrP2ajUUFr1Fj99G3Cf0Iz687LeJaMiKhz1bORnn6jZOhSJQRZHW6GD6VJEeeaP2ZO5emNmyW4E8bx7RQlkw/hMiAsj7n9cN8wxXdZqcTIIMSbPN6v1JQTqUldwfzevu605XlC86HYT1Z6kn2G2qbQDNlCUeZ/LMYwCOV8Qnd8O7KxWKz2Dwdwl/3l9rwKcmUXwjYVNUOwjwk0YY+SDp/ggnZ8MCCnjqLCyMTYiJf1VqRLYpsmU/ir725F/O0quyOpPh/KKAIBpsb7yrcacgcOw== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Magnus Kulke , Mohamed Mediouni , Pierrick Bouvier , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Wei Liu , Pedro Barbuda , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Roman Bolshakov , Phil Dennis-Jordan Subject: [PATCH v5 2/6] whpx: i386: trace unsupported MSR accesses Date: Fri, 27 Mar 2026 00:31:26 +0100 Message-ID: <20260326233130.59392-3-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260326233130.59392-1-mohamed@unpredictable.fr> References: <20260326233130.59392-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: TBVAe0hvEA2jvCIQcagDeC6QmVKrUiTq X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzI2MDE2NyBTYWx0ZWRfXwsKOX8hc4HEo s2E9Xa5vLpI9XaqiFl5/BTgEnbUclFM8EGI/3MAQz2iCC5dkPtumTk/KRtijJewWEdkzW2UBb9m 6gm16ho97pjcoy17XZ9eJUWzbvJjwRcCZ31iVA7c/ApYmFHaRmdHNlJEcTXnYIcI5RZ+l2GV3k+ sYHgCin1Lbp0rzlq8ILDGtQAjII+h5LW+GSlkPaWZtlbwI+6djoA4b+MD+mBekQvouPuO2cZURF WJTOkSyaX+wQF+IKUrhrWACcCSKAsoAjiPOkWcsXaw8x/vg2iifVXDwlfULeEYhPAVbvYUjLNV2 Vb8mZCy+NHMKwtvTHNxHHBY+GGfi435nwCXvND+ShozrfjZa2x1XJnidlfyv7w= X-Authority-Info-Out: v=2.4 cv=ffCgCkQF c=1 sm=1 tr=0 ts=69c5c1dc cx=c_apl:c_pps:t_out a=2G65uMN5HjSv0sBfM2Yj2w==:117 a=2G65uMN5HjSv0sBfM2Yj2w==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=KKAkSRfTAAAA:8 a=BggPbTrBReIH5vXiFLoA:9 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: TBVAe0hvEA2jvCIQcagDeC6QmVKrUiTq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-26_04,2026-03-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 malwarescore=0 spamscore=0 clxscore=1030 mlxlogscore=388 mlxscore=0 lowpriorityscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603260167 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.88.171; envelope-from=mohamed@unpredictable.fr; helo=outbound.ci.icloud.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @unpredictable.fr) X-ZM-MESSAGEID: 1774567949218158500 Content-Type: text/plain; charset="utf-8" Not actionable information for users, so stop having it displayed unconditionally. Signed-off-by: Mohamed Mediouni Reviewed-by: Pierrick Bouvier --- meson.build | 1 + target/i386/whpx/trace-events | 1 + target/i386/whpx/trace.h | 2 ++ target/i386/whpx/whpx-all.c | 5 +++-- 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 target/i386/whpx/trace-events create mode 100644 target/i386/whpx/trace.h diff --git a/meson.build b/meson.build index e6f17dd5f7..c19c5afa46 100644 --- a/meson.build +++ b/meson.build @@ -3692,6 +3692,7 @@ if have_system or have_user 'target/hppa', 'target/i386', 'target/i386/kvm', + 'target/i386/whpx', 'target/loongarch', 'target/mips/tcg', 'target/ppc', diff --git a/target/i386/whpx/trace-events b/target/i386/whpx/trace-events new file mode 100644 index 0000000000..ebdfa34b28 --- /dev/null +++ b/target/i386/whpx/trace-events @@ -0,0 +1 @@ +whpx_unsupported_msr_access(uint32_t msr, int is_write) "WHPX: Unsupported= MSR access (0x%x), IsWrite=3D%i" diff --git a/target/i386/whpx/trace.h b/target/i386/whpx/trace.h new file mode 100644 index 0000000000..b7c090deff --- /dev/null +++ b/target/i386/whpx/trace.h @@ -0,0 +1,2 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#include "trace/trace-target_i386_whpx.h" diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index acae61e089..e56ae2b343 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -41,6 +41,7 @@ #include "emulate/x86_emu.h" #include "emulate/x86_flags.h" #include "emulate/x86_mmu.h" +#include "trace.h" =20 #include =20 @@ -1921,8 +1922,8 @@ int whpx_vcpu_run(CPUState *cpu) 1 : 3; =20 if (!is_known_msr) { - warn_report("WHPX: Unsupported MSR access (0x%x), IsWrite= =3D%i",=20 - vcpu->exit_ctx.MsrAccess.MsrNumber, vcpu->exit_ctx.MsrAcce= ss.AccessInfo.IsWrite); + trace_whpx_unsupported_msr_access(vcpu->exit_ctx.MsrAccess= .MsrNumber, + vcpu->exit_ctx.MsrAccess.AccessInfo.IsWrite); } =20 hr =3D whp_dispatch.WHvSetVirtualProcessorRegisters( --=20 2.50.1 (Apple Git-155) From nobody Thu Apr 2 18:47: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=1774567921; cv=none; d=zohomail.com; s=zohoarc; b=Fj2A0Xu5PKf6ohqaLUsJEmhj+3QqSNzkVZlpqnWVCoX4Hftlfplc9cA7Re9FeSI2afVEhevvZkud91XWKQB+PAIO2qqZg1RdCBUJ8DQGeVN5jzV7DQJSRxTTt8ImyUHPpYcKPikLACIybtUdMf5VRxrtCXrJG++58jyOcZLaZLM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774567921; 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=5S7KGKEy49UgCD0FUZ1I15cZ4AJCf9WeQ1uRb+nbjmM=; b=Cj4mFHLW1p31ohD5DlZ5QT6ypWgOwx4TFoNOEPUWsEB9qXIb6CH+rLDZqGY3VQoMOXYc1bCrd+95dTKYSdfBc5iRsxCt4DKymeTEpHbsPEVu0ih9OdvfJQBc9wVBExNSt8GRUGFJJD6wz994AeOQKaMYylm+FjNrwI1K0ElQk6A= 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 1774567920460252.35974478342803; Thu, 26 Mar 2026 16:32:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5uB2-00086y-3S; Thu, 26 Mar 2026 19:31:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5uAz-000861-Ia for qemu-devel@nongnu.org; Thu, 26 Mar 2026 19:31:45 -0400 Received: from ci-2002j-snip4-2.eps.apple.com ([57.103.88.223] helo=outbound.ci.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5uAx-0003oq-Tj for qemu-devel@nongnu.org; Thu, 26 Mar 2026 19:31:45 -0400 Received: from outbound.ci.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-central-1k-10-percent-0 (Postfix) with ESMTPS id 00F2A180012C; Thu, 26 Mar 2026 23:31:40 +0000 (UTC) Received: from localhost.localdomain (unknown [17.57.156.36]) by p00-icloudmta-asmtp-us-central-1k-10-percent-0 (Postfix) with ESMTPSA id C2EBE1800882; Thu, 26 Mar 2026 23:31:38 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1774567903; x=1777159903; bh=5S7KGKEy49UgCD0FUZ1I15cZ4AJCf9WeQ1uRb+nbjmM=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=Jcn9OREU1CnMnJs6trW93ueKWHWv+cAsK2PDPPQpFhtbQqpmEfr9ji82xHhvA2YQX9LlSvJk4rIIWosqI3YG66Uhr3v1/g9dRM1PC8Ps9Izgl0kLSPanCIvA0OfRk9Rf6IvofP+57fjrqUT3kyDQ6gI7e3Y/bY1ppnoavGtekPipPhnTltMPoEA1fv4iiPcgEpG2XilYFAH4HIs6rWiRTmNH/XOtmc4XDhwWEMaBVHj+jk/Q8RFXXTMN4wzg8JrTelK3JJNjWkEHSGGPPHgwBvtuuKH6c4jNzldL6OolImHUctabxB+kVTd5sCf59k3/T6unla6VGKuQPoIts5w0ww== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Magnus Kulke , Mohamed Mediouni , Pierrick Bouvier , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Wei Liu , Pedro Barbuda , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Roman Bolshakov , Phil Dennis-Jordan Subject: [PATCH v5 3/6] target/i386: emulate: remove redundant logging for unmapped MMIO access Date: Fri, 27 Mar 2026 00:31:27 +0100 Message-ID: <20260326233130.59392-4-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260326233130.59392-1-mohamed@unpredictable.fr> References: <20260326233130.59392-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: _XKE4OoeBJKK3QsSFE-ap5RVSRUZ6v5d X-Proofpoint-ORIG-GUID: _XKE4OoeBJKK3QsSFE-ap5RVSRUZ6v5d X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzI2MDE2NyBTYWx0ZWRfX3yqA+VQjdWPI heSK/drucxbirO01Gemv8lVj8CpDV71RvGTvOtgmQ+r9jg9eBO8j25yMHqZG8FTXj5pu0Fn2HxO 4E0Hp9I2N5mG3TWsTYcL6F5CtYWQYTWksyHo2QzIYw+7Du2cPicsbBQPjuuUu9qz6K3wwOIRdHf 1WnfIGQIOYG1JoGynwkb287fFS8A8b/Ne2/zbIxJopIV/kf1FWNNm3Fp1dFeNZV4CYXnSpL3Iqo ca6Clv9EN2qizrxCIYKyWHER3RS48Fua+FIKa5eBQrNRTLWSyBmhLAdr2Vxm3NMmnVo4Np/0A9d uG/PhMLZJdLxfLf+oC4AP1JUTF/vNzXhsL2g/Z3Oys2F5hmpjfmUD1dcrUMViE= X-Authority-Info-Out: v=2.4 cv=BJi+bVQG c=1 sm=1 tr=0 ts=69c5c1de cx=c_apl:c_pps:t_out a=2G65uMN5HjSv0sBfM2Yj2w==:117 a=2G65uMN5HjSv0sBfM2Yj2w==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=nKRBnGPCAAAA:8 a=Pf3sjxmatUTUh5CUccMA:9 a=JhrwjW1jOIvqYJKOqOMI:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-26_03,2026-03-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1030 mlxscore=0 suspectscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 spamscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603260167 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.88.223; envelope-from=mohamed@unpredictable.fr; helo=outbound.ci.icloud.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @unpredictable.fr) X-ZM-MESSAGEID: 1774567926248158500 Content-Type: text/plain; charset="utf-8" ReactOS's install ISO does a bunch of 4-byte accesses to 0xffdff124. This doesn't happen for the boot ISO. It looks to be an access relative to the Windows KPCR which is at 0xffdff000 but mistakenly done prior to paging being on... As this logging is redundant with -d invalid_mem, remove it. https://geoffchappell.com/studies/windows/km/ntoskrnl/inc/ntos/i386_x/kpcr.= htm Signed-off-by: Mohamed Mediouni --- target/i386/emulate/x86_mmu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/i386/emulate/x86_mmu.c b/target/i386/emulate/x86_mmu.c index c69ae96acb..007de582de 100644 --- a/target/i386/emulate/x86_mmu.c +++ b/target/i386/emulate/x86_mmu.c @@ -21,7 +21,6 @@ #include "cpu.h" #include "system/address-spaces.h" #include "system/memory.h" -#include "qemu/error-report.h" #include "emulate/x86.h" #include "emulate/x86_emu.h" #include "emulate/x86_mmu.h" @@ -287,7 +286,6 @@ static MMUTranslateResult x86_write_mem_ex(CPUState *cp= u, void *data, target_ulo MEMTXATTRS_UNSPECIFIED, data, copy); =20 if (mem_tx_res =3D=3D MEMTX_DECODE_ERROR) { - warn_report("write to unmapped mmio region gpa=3D0x%" PRIx64 "= size=3D%i", gpa, bytes); return MMU_TRANSLATE_GPA_UNMAPPED; } else if (mem_tx_res =3D=3D MEMTX_ACCESS_ERROR) { return MMU_TRANSLATE_GPA_NO_WRITE_ACCESS; @@ -339,7 +337,6 @@ static MMUTranslateResult x86_read_mem_ex(CPUState *cpu= , void *data, target_ulon data, copy); =20 if (mem_tx_res =3D=3D MEMTX_DECODE_ERROR) { - warn_report("read from unmapped mmio region gpa=3D0x%" PRIx64 = " size=3D%i", gpa, bytes); return MMU_TRANSLATE_GPA_UNMAPPED; } else if (mem_tx_res =3D=3D MEMTX_ACCESS_ERROR) { return MMU_TRANSLATE_GPA_NO_READ_ACCESS; --=20 2.50.1 (Apple Git-155) From nobody Thu Apr 2 18:47: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=1774567933; cv=none; d=zohomail.com; s=zohoarc; b=YPVril8Q68FmBIfaSjoaxooTk69WQTAAri02811jNnTum6PVKXenxI84w9sk5Q8yMBxWN9X9x7MckK6B8Sef+auLFnJ9wMXzZMbUGuHpYDlEcJSX9vrPfGHOJOEi4GmxxPsIlazK4i/OvH9Zzmc09poV8h1Pof0KuRq/qTMFeck= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774567933; 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=9F76Cc23dABknhkRSAI7rbUjPIKVT+f9IPw6XaqJqx4=; b=X12Yj7vg0fQWviVvR6ix2a3dh9W37qoBfHjlHhHgIJV3QFGY7KL4KFkTQuwURoqH7nd1ASjqkkpgQxEo729dhuOZ3ARW3LqVUASEXTrL1JNTSUcimTolq7+xt2nYjr2JF7iFbSkRIernitwohtLaIBfrRSJpQKLyXnmTduX0EXI= 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 1774567933081590.8777210206096; Thu, 26 Mar 2026 16:32:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5uB8-00088I-Pr; Thu, 26 Mar 2026 19:31:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5uB3-00087L-ML for qemu-devel@nongnu.org; Thu, 26 Mar 2026 19:31:49 -0400 Received: from ci-2002f-snip4-10.eps.apple.com ([57.103.88.190] helo=outbound.ci.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5uB2-0003ph-06 for qemu-devel@nongnu.org; Thu, 26 Mar 2026 19:31:49 -0400 Received: from outbound.ci.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-central-1k-10-percent-0 (Postfix) with ESMTPS id EF6DB1800103; Thu, 26 Mar 2026 23:31:42 +0000 (UTC) Received: from localhost.localdomain (unknown [17.57.156.36]) by p00-icloudmta-asmtp-us-central-1k-10-percent-0 (Postfix) with ESMTPSA id 985011800224; Thu, 26 Mar 2026 23:31:40 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1774567905; x=1777159905; bh=9F76Cc23dABknhkRSAI7rbUjPIKVT+f9IPw6XaqJqx4=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=MbgqTUuFwmpe6R5dxEcaBHfEeDZTuD+AqaTVr80X/BLb6gLzftGBxZ0iwd88lWqrnHaADMyyc6zFGY7ryZIDYmqJb2sk07uYMzDkpStVbbzrnCbEurcHATkzJKjxoBvkFfMChi+EEBXCtBmB+nCMKu4mX64LXKPZ0/jNBqGL+SXyNHBP6aDKsiD/gu9coKIUK51tqGVZHj0ShM+V7xPvAtHikhLY80wtAHgchxeFVHDnYPbotY0POceIZ8BYbVV7kb7h+0qrXV6NrhdSae7lms1kbjOn5ybexCKQYgfwjp1xWjrSGjQGSqqsXqRxhbXvqwHROJvctT6nSp/PWkrk0A== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Magnus Kulke , Mohamed Mediouni , Pierrick Bouvier , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Wei Liu , Pedro Barbuda , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Roman Bolshakov , Phil Dennis-Jordan Subject: [PATCH v5 4/6] target/i386/emulate, whpx, hvf, mshv: add read_segment_selector Date: Fri, 27 Mar 2026 00:31:28 +0100 Message-ID: <20260326233130.59392-5-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260326233130.59392-1-mohamed@unpredictable.fr> References: <20260326233130.59392-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: fgbLqZLycrHx6-bghaemGGI_1oidSlaq X-Authority-Info-Out: v=2.4 cv=PPsCOPqC c=1 sm=1 tr=0 ts=69c5c1e0 cx=c_apl:c_pps:t_out a=2G65uMN5HjSv0sBfM2Yj2w==:117 a=2G65uMN5HjSv0sBfM2Yj2w==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=iZGBPGrxHaysoRuNUwEA:9 X-Proofpoint-ORIG-GUID: fgbLqZLycrHx6-bghaemGGI_1oidSlaq X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzI2MDE2NyBTYWx0ZWRfX3uxqfl7Wgvwl AEIQ6I7sqmnPzEDUMKCOy9mNilx5BGkWjHkA26kS59z0lxY+wr3W0V8n6rjEBfyu1b2DkzPJhKC A75jUnNk39B52ZzvM5SCqG1CRSv4kGRWdpZNV0WNw4PBgeRvmO9/i0mIAjjhqjR8KAZlSeNZZK2 wcUSwp6fTCeFHkTLb3yakXqzbl3EI/pFA3syIBQ2y0f+E5mHA11dGYmxrEFJ9V/icok1CwTgdRm TRMqXTNUHYgNsU39Dbh8eFlF6G48v9HI+IhU7GfcYfzzxeMyYUE/hv4Lo88atvn8z39mj++WabQ +k3mSOLixbDeZlDB7kY8h3w/WNne6tdLCBnzxrHjQ87yvMIRChwOXQL6B9/cGY= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-26_03,2026-03-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 bulkscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 clxscore=1030 phishscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603260167 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.88.190; envelope-from=mohamed@unpredictable.fr; helo=outbound.ci.icloud.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @unpredictable.fr) X-ZM-MESSAGEID: 1774567935535158500 Content-Type: text/plain; charset="utf-8" Opens the door to implement SLDT in the instruction emulator. Signed-off-by: Mohamed Mediouni --- target/i386/emulate/x86_emu.h | 1 + target/i386/hvf/hvf.c | 1 + target/i386/mshv/mshv-cpu.c | 11 +++++++++++ target/i386/whpx/whpx-all.c | 10 ++++++++++ 4 files changed, 23 insertions(+) diff --git a/target/i386/emulate/x86_emu.h b/target/i386/emulate/x86_emu.h index a8d4c93098..2397c24200 100644 --- a/target/i386/emulate/x86_emu.h +++ b/target/i386/emulate/x86_emu.h @@ -28,6 +28,7 @@ struct x86_emul_ops { MMUTranslateResult (*mmu_gva_to_gpa) (CPUState *cpu, target_ulong gva,= uint64_t *gpa, MMUTranslateFlags flags); void (*read_segment_descriptor)(CPUState *cpu, struct x86_segment_desc= riptor *desc, enum X86Seg seg); + x86_segment_selector (*read_segment_selector)(CPUState *cpu, enum X86S= eg seg); target_ulong (*read_cr) (CPUState *cpu, int cr); void (*handle_io)(CPUState *cpu, uint16_t port, void *data, int direct= ion, int size, int count); diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index c0d028b147..8fda4429b3 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -254,6 +254,7 @@ static void hvf_read_segment_descriptor(CPUState *s, st= ruct x86_segment_descript =20 static const struct x86_emul_ops hvf_x86_emul_ops =3D { .read_segment_descriptor =3D hvf_read_segment_descriptor, + .read_segment_selector =3D vmx_read_segment_selector, .handle_io =3D hvf_handle_io, .simulate_rdmsr =3D hvf_simulate_rdmsr, .simulate_wrmsr =3D hvf_simulate_wrmsr, diff --git a/target/i386/mshv/mshv-cpu.c b/target/i386/mshv/mshv-cpu.c index 2bc978deb2..25e0de2eab 100644 --- a/target/i386/mshv/mshv-cpu.c +++ b/target/i386/mshv/mshv-cpu.c @@ -1565,8 +1565,19 @@ static void read_segment_descriptor(CPUState *cpu, } } =20 +static x86_segment_selector read_segment_selector(CPUState *cpu, enum X86S= eg seg_idx) +{ + X86CPU *x86_cpu =3D X86_CPU(cpu); + CPUX86State *env =3D &x86_cpu->env; + SegmentCache *seg =3D &env->segs[seg_idx]; + x86_segment_selector sel =3D { .sel =3D seg->selector & 0xFFFF }; + + return sel; +} + static const struct x86_emul_ops mshv_x86_emul_ops =3D { .read_segment_descriptor =3D read_segment_descriptor, + .read_segment_selector =3D read_segment_selector }; =20 void mshv_init_mmio_emu(void) diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index e56ae2b343..9a405118c5 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -998,6 +998,15 @@ static void read_segment_descriptor(CPUState *cpu, whpx_segment_to_x86_descriptor(cpu, ®, desc); } =20 +static x86_segment_selector read_segment_selector(CPUState *cpu, enum X86S= eg seg_idx) +{ + WHV_X64_SEGMENT_REGISTER reg; + x86_segment_selector sel; + whpx_read_segment_descriptor(cpu, ®, seg_idx); + sel.sel =3D reg.Selector & 0xFFFF; + return sel; +} + static bool is_protected_mode(CPUState *cpu) { AccelCPUState *vcpu =3D cpu->accel; @@ -1049,6 +1058,7 @@ static target_ulong read_cr(CPUState *cpu, int cr) =20 static const struct x86_emul_ops whpx_x86_emul_ops =3D { .read_segment_descriptor =3D read_segment_descriptor, + .read_segment_selector =3D read_segment_selector, .handle_io =3D handle_io, .is_protected_mode =3D is_protected_mode, .is_long_mode =3D is_long_mode, --=20 2.50.1 (Apple Git-155) From nobody Thu Apr 2 18:47: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=1774567968; cv=none; d=zohomail.com; s=zohoarc; b=FoAMC0McPLJbG1IyUYqqPxhiRJi0bNJlhJB7kfV0LA8DQhKh62IdFNCJP3Cm/CEG062dJ+8ynjZDoeIvZ3zzUTQuk0fBHkWrBYoLE2/98x9JQOB3ku4Tk2hVI08+jh6g9oO7iJU4UYEzrYOFQftIy99wrV6GUaMZ84t4etg7QZo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774567968; 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=jSFEY3OW57r5Gmf0SB6G349rIgUNCT10rXc1M/CBSww=; b=Of7QK5SPz9dFcgwhkLgcdFDIHizdKFJ++N5DrLzel9ErNtptaoM1xqTv6inq30/TW0gflkNvhvZ23nSxAHrjzAcUX4EupgBMWfMgpuGvgINDicKSPV1B0kh9o2urudIF4fZ/pldh9u+a32mDm0gCx71Oa9k2TFbl37M2CwuPbx0= 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 1774567967879612.9482901138589; Thu, 26 Mar 2026 16:32:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5uBA-00088y-Ek; Thu, 26 Mar 2026 19:31:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5uB4-00087V-RW for qemu-devel@nongnu.org; Thu, 26 Mar 2026 19:31:54 -0400 Received: from ci-2002e-snip4-5.eps.apple.com ([57.103.88.176] helo=outbound.ci.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5uB2-0003pq-AI for qemu-devel@nongnu.org; Thu, 26 Mar 2026 19:31:50 -0400 Received: from outbound.ci.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-central-1k-10-percent-0 (Postfix) with ESMTPS id BE700180013B; Thu, 26 Mar 2026 23:31:44 +0000 (UTC) Received: from localhost.localdomain (unknown [17.57.156.36]) by p00-icloudmta-asmtp-us-central-1k-10-percent-0 (Postfix) with ESMTPSA id 6C1B418008AA; Thu, 26 Mar 2026 23:31:42 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1774567907; x=1777159907; bh=jSFEY3OW57r5Gmf0SB6G349rIgUNCT10rXc1M/CBSww=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=UD5nlLXJMs+5W3qllEDc+/qOnCBbT/fy7gixmSqnJdTe7QyDyDT7Q7ZD51Xya303UuKwMRd3aKGqyPGm3UBP/SZCaBC41jA6svBNSEambDnE3dyDvIyUrTuoi1jS7CHhk9CaB5Q+s/ZBPLSMQIbLmoACrWAv3uBZVb7/2k4V7RX2w8Zcv9bM+tnXZfWrhpUBmJJaFJk9afcN050TPeUTIZzFVncXW6/B21W8qKWkIq8ciJOkJIM1HY0JgXZ9seTzPbsS0QWWTdW+oDCPnn8jxxdxMuSiFUtyJAvmn0AMMoybqZWhckKZR8Vbv6nfbAc7b+4ki1IsUunmbkJ1pNd8sQ== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Magnus Kulke , Mohamed Mediouni , Pierrick Bouvier , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Wei Liu , Pedro Barbuda , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Roman Bolshakov , Phil Dennis-Jordan Subject: [PATCH v5 5/6] target/i386: emulate: include name of unhandled instruction Date: Fri, 27 Mar 2026 00:31:29 +0100 Message-ID: <20260326233130.59392-6-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260326233130.59392-1-mohamed@unpredictable.fr> References: <20260326233130.59392-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: G7bG-Gtq4nBFzfFxpwlVKD7ktWNgLj0H X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzI2MDE2NyBTYWx0ZWRfX/Vo9mIr5k9vo X/HwZutd0dYNZgR8TZ6t3NAMULT+V3a0EBZcpPqXJQK/9suioBC8jgf+Kj5MS8T0YIGPzEw62ux 3UKBQn2n3tgrEgKVec1tOoR45HqiKyLsATayDFpG/nFNCZ15GxWoLQeXi/sxK6L/TMyp2Qdi6Mv WMiaiPQihMM0r1zjmNc1O/yXFKYWEoLnAArD1Hf4HNfrWoEqmyWl/PTwaMKvl8jpkJhHx7gn/H+ uLWW+iARUHPHaQhtZeh9E65i8OHuMXWopqkq+dYkQ6bgYXDK2MAbBQN/MyjKFj/313b4EJ75qny n/7KhksTYJ/np8qEq/ZF0mCVOaMEKPr4YXshTfAFlx1v0cZ83ZM/7wxhiZZwtk= X-Authority-Info-Out: v=2.4 cv=TY6bdBQh c=1 sm=1 tr=0 ts=69c5c1e2 cx=c_apl:c_pps:t_out a=2G65uMN5HjSv0sBfM2Yj2w==:117 a=2G65uMN5HjSv0sBfM2Yj2w==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=x0iqa3ucmZZh0HPruXgA:9 X-Proofpoint-ORIG-GUID: G7bG-Gtq4nBFzfFxpwlVKD7ktWNgLj0H X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-26_04,2026-03-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=946 clxscore=1030 spamscore=0 mlxscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 phishscore=0 adultscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603260167 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.88.176; envelope-from=mohamed@unpredictable.fr; helo=outbound.ci.icloud.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @unpredictable.fr) X-ZM-MESSAGEID: 1774567970039154100 Content-Type: text/plain; charset="utf-8" Instead of just the command number, include the instruction name to make de= bugging easier. Signed-off-by: Mohamed Mediouni --- target/i386/emulate/x86_emu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/emulate/x86_emu.c b/target/i386/emulate/x86_emu.c index 55b1a68eb6..c2da1a133f 100644 --- a/target/i386/emulate/x86_emu.c +++ b/target/i386/emulate/x86_emu.c @@ -1399,8 +1399,8 @@ static void init_cmd_handler(void) bool exec_instruction(CPUX86State *env, struct x86_decode *ins) { if (!_cmd_handler[ins->cmd].handler) { - printf("Unimplemented handler (" TARGET_FMT_lx ") for %d (%x %x)\n= ", - env->eip, + printf("Unimplemented handler (" TARGET_FMT_lx ") for %s - %d (%x = %x)\n", + env->eip, decode_cmd_to_string(ins->cmd), ins->cmd, ins->opcode[0], ins->opcode_len > 1 ? ins->opcode[1] : 0); env->eip +=3D ins->len; --=20 2.50.1 (Apple Git-155) From nobody Thu Apr 2 18:47: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=1774567964; cv=none; d=zohomail.com; s=zohoarc; b=VJCAQPk/jX5ciVAtZjkeWlPYxin6rPRNBE1rKxHHgdYTfptgRrtQ1UdphtUpPurIJk/OzjnvuCkfkWQD68weckzb9i5az/ppLlFowBmyN0Bej3OkxNP7t3bRvTPyYBq8NgFRDis/RVjQV3YuVCDtSfV9FGa4gmC+zzNGXN558aU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774567964; 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=hKEJoh4ZK0FFxEPysK5m7KR7gOdokjPvbVT9IIB4jTk=; b=Yo2DMQDs+CKq1sa+Jgf7CioepK/IH1KRd1lChd8DNqO8qshL9yPUEieN0j3RgqHWb2Ukl16fwK1eY6v4+unMKslwFQfBLSw8sQBcrzjt+w6cjZsldJ7C2wKRlVzBHgrO99hu+kT4Ul/P6MtG9+5Huga69LyIwKvVHqRkDJcEalI= 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 1774567963681927.9160917073912; Thu, 26 Mar 2026 16:32:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5uBB-00089E-2O; Thu, 26 Mar 2026 19:31:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5uB5-00087W-8a for qemu-devel@nongnu.org; Thu, 26 Mar 2026 19:31:54 -0400 Received: from ci-2002d-snip4-8.eps.apple.com ([57.103.88.169] helo=outbound.ci.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5uB3-0003qX-6T for qemu-devel@nongnu.org; Thu, 26 Mar 2026 19:31:50 -0400 Received: from outbound.ci.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-central-1k-10-percent-0 (Postfix) with ESMTPS id 761BF180088B; Thu, 26 Mar 2026 23:31:46 +0000 (UTC) Received: from localhost.localdomain (unknown [17.57.156.36]) by p00-icloudmta-asmtp-us-central-1k-10-percent-0 (Postfix) with ESMTPSA id 44FC91800128; Thu, 26 Mar 2026 23:31:44 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; t=1774567908; x=1777159908; bh=hKEJoh4ZK0FFxEPysK5m7KR7gOdokjPvbVT9IIB4jTk=; h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme; b=N59A2/wHa7b9uxSCuece/GOCgaEDJvK+3TgSq9uTjZaIdRwjjpHUbBzuSewUoJhe7ZSKD7Pc9hcd8ocfqVoFQEc33o3zUwZzNEFMc8/lXkeLAS/E9TPhe+OmiHHTijgyD5K/Im3C2qYRBUmAwCim9aRZdM/Sj9hkv6aFdpa9OfxfqowMZTEXom5vLOt3YISLvHO3oOfQC+bYVDIfs3cvjeecpZgze/VeUEv5vp872Tx/o48hqhMIL1ECbBoamQnUVrFFCKTpaCdmf+j7zJGOVl/G0farSNvdcejFax75wpyV2udux4hYgNS/UsSBnE6L3MppmXrdPgOU2zHE540QrQ== mail-alias-created-date: 1752046281608 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Magnus Kulke , Mohamed Mediouni , Pierrick Bouvier , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Wei Liu , Pedro Barbuda , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Roman Bolshakov , Phil Dennis-Jordan Subject: [PATCH v5 6/6] target/i386: emulate: emulate SLDT and STR Date: Fri, 27 Mar 2026 00:31:30 +0100 Message-ID: <20260326233130.59392-7-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260326233130.59392-1-mohamed@unpredictable.fr> References: <20260326233130.59392-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: sHnvFcskANbVaD-jyEe-y4qahMCdJ7dE X-Authority-Info-Out: v=2.4 cv=PPsCOPqC c=1 sm=1 tr=0 ts=69c5c1e3 cx=c_apl:c_pps:t_out a=2G65uMN5HjSv0sBfM2Yj2w==:117 a=2G65uMN5HjSv0sBfM2Yj2w==:17 a=Yq5XynenixoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=p0WdMEafAAAA:8 a=h0iFb2CXyTZTJYbVGV0A:9 X-Proofpoint-ORIG-GUID: sHnvFcskANbVaD-jyEe-y4qahMCdJ7dE X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzI2MDE2NyBTYWx0ZWRfX9u0oB/qFs8/u 4+vZwte520H0nbCOeIKIapX5SINcHLbUghESbj/hhsGcybo20r3TqI9aRPYgsjWrnP9hjWkUoXm 2m4on3e7cid8DWpRBgm544c+U2fZot91I9IdJL4X6off4TSoxoCTT7WDSIOZ1Chldz4/NL6Pdpr XrfG8RekiEJMTJfcBqpRXbRmq2am7E30+E8CYLDJBgORPCw0S5KCeQFnjNNgDOxMmq8J/SclS2X wpbvES6KgEWe8Mud/q5BglbyGWxsZ8Rz0BmApYyRvANJQZgjFYR1bx5yNdENdlD2hUTj6w7E2vf aYd9Mw5cPbRCJGpfP3t8BWZjzeERJhJ8FTUXNzC0V1S5MZS16RxgaSsPf8adtE= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-26_03,2026-03-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 bulkscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=794 suspectscore=0 clxscore=1030 phishscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603260167 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.88.169; envelope-from=mohamed@unpredictable.fr; helo=outbound.ci.icloud.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @unpredictable.fr) X-ZM-MESSAGEID: 1774567965201158500 Content-Type: text/plain; charset="utf-8" Never saw that one being trapped and could not reproduce on AMD. But from the QEMU bug tracker, that looks like another story on Intel processors. Present in "whpx_failures.txt" on https://gitlab.com/qemu-project/qemu/-/work_items/3349#note_3195249254 Signed-off-by: Mohamed Mediouni --- target/i386/emulate/x86_emu.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/target/i386/emulate/x86_emu.c b/target/i386/emulate/x86_emu.c index c2da1a133f..e6e6500ea5 100644 --- a/target/i386/emulate/x86_emu.c +++ b/target/i386/emulate/x86_emu.c @@ -1338,6 +1338,22 @@ static bool exec_xadd(CPUX86State *env, struct x86_d= ecode *decode) return 0; } =20 +static bool exec_sldt(CPUX86State *env, struct x86_decode *decode) +{ + x86_segment_selector seg =3D emul_ops->read_segment_selector(env_cpu(e= nv), R_LDTR); + write_val_ext(env, &decode->op[0], seg.sel, 2); + env->eip +=3D decode->len; + return 0; +} + +static bool exec_str(CPUX86State *env, struct x86_decode *decode) +{ + x86_segment_selector seg =3D emul_ops->read_segment_selector(env_cpu(e= nv), R_TR); + write_val_ext(env, &decode->op[0], seg.sel, 2); + env->eip +=3D decode->len; + return 0; +} + static struct cmd_handler { enum x86_decode_cmd cmd; bool (*handler)(CPUX86State *env, struct x86_decode *ins); @@ -1382,6 +1398,8 @@ static struct cmd_handler { {X86_DECODE_CMD_MOVSX, exec_movsx}, {X86_DECODE_CMD_XCHG, exec_xchg}, {X86_DECODE_CMD_XADD, exec_xadd}, + {X86_DECODE_CMD_SLDT, exec_sldt}, + {X86_DECODE_CMD_STR, exec_str} }; =20 static struct cmd_handler _cmd_handler[X86_DECODE_CMD_LAST]; --=20 2.50.1 (Apple Git-155)