Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196194/?format=api
{ "id": 2196194, "url": "http://patchwork.ozlabs.org/api/patches/2196194/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260213034556.13471-11-mohamed@unpredictable.fr/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260213034556.13471-11-mohamed@unpredictable.fr>", "list_archive_url": null, "date": "2026-02-13T03:45:53", "name": "[v2,10/10] whpx: x86: optimise MMIO vmexit by only restoring needed registers", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "8740479bc295587187c4861a81f9ee322bd3cc60", "submitter": { "id": 91318, "url": "http://patchwork.ozlabs.org/api/people/91318/?format=api", "name": "Mohamed Mediouni", "email": "mohamed@unpredictable.fr" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260213034556.13471-11-mohamed@unpredictable.fr/mbox/", "series": [ { "id": 492055, "url": "http://patchwork.ozlabs.org/api/series/492055/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=492055", "date": "2026-02-13T03:45:43", "name": "whpx: x86 updates (2026-02)", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/492055/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196194/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196194/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=unpredictable.fr header.i=@unpredictable.fr\n header.a=rsa-sha256 header.s=sig1 header.b=AR0AxXRO;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fBymf3L7Zz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 13 Feb 2026 14:47:46 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vqk8j-0008QB-JO; Thu, 12 Feb 2026 22:46:45 -0500", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <mohamed@unpredictable.fr>)\n id 1vqk8i-0008OL-6V\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 22:46:44 -0500", "from p-west1-cluster4-host2-snip4-10.eps.apple.com ([57.103.65.151]\n helo=outbound.pv.icloud.com)\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <mohamed@unpredictable.fr>)\n id 1vqk8g-0005ti-J0\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 22:46:43 -0500", "from outbound.pv.icloud.com (unknown [127.0.0.2])\n by p00-icloudmta-asmtp-us-west-1a-60-percent-11 (Postfix) with ESMTPS id\n 897C018002DF; Fri, 13 Feb 2026 03:46:39 +0000 (UTC)", "from localhost.localdomain (unknown [17.56.9.36])\n by p00-icloudmta-asmtp-us-west-1a-60-percent-11 (Postfix) with ESMTPSA id\n 3F0C318002E7; Fri, 13 Feb 2026 03:46:36 +0000 (UTC)" ], "Dkim-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr;\n s=sig1; t=1770954400; x=1773546400;\n bh=9sUcaeoz6C4CulqwK75rnnECZ/Yp9/cyUOcLGfOPaHE=;\n h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme;\n b=AR0AxXROQDzB193Ge8KjhrVyS6btpJUj/TMsJuDK26Mszm+tG87FZ1mCa6AAszQRz5uLPjJMEHRz/txMggv1xg72thXuJoNOgJuPiBTS+6gFTWuEstcfp7TIsPWb3aK/wpM/GeX27gVFk4fIDCZtc43XJHHS4L9CvDyzl0KR3UH8RQkXJk48kgijjByqlS6iU+e0M46q0bL/qDA7k79oSbNxxsnQ9ZaFM1pOQn2OiSOfi9k+HZjx2gd8Y7QiD50ZZKInHZWTgZTAvHdiEPELbKZx7o1/EwWrXk5AalLf0d34u1sxqfu7o94fqG0B7qWeAUoaAPlPb7TwjNaIZer3dg==", "mail-alias-created-date": "1752046281608", "From": "Mohamed Mediouni <mohamed@unpredictable.fr>", "To": "qemu-devel@nongnu.org", "Cc": "=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n Magnus Kulke <magnuskulke@linux.microsoft.com>, =?utf-8?q?Philippe_Mathieu-?=\n\t=?utf-8?q?Daud=C3=A9?= <philmd@linaro.org>,\n Bernhard Beschow <shentey@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>,\n Mohamed Mediouni <mohamed@unpredictable.fr>, Wei Liu <wei.liu@kernel.org>,\n Pedro Barbuda <pbarbuda@microsoft.com>, Cameron Esfahani <dirty@apple.com>,\n Peter Maydell <peter.maydell@linaro.org>,\n Phil Dennis-Jordan <phil@philjordan.eu>, Zhao Liu <zhao1.liu@intel.com>,\n Roman Bolshakov <rbolshakov@ddn.com>,\n =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>", "Subject": "[PATCH v2 10/10] whpx: x86: optimise MMIO vmexit by only restoring\n needed registers", "Date": "Fri, 13 Feb 2026 04:45:53 +0100", "Message-ID": "<20260213034556.13471-11-mohamed@unpredictable.fr>", "X-Mailer": "git-send-email 2.50.1", "In-Reply-To": "<20260213034556.13471-1-mohamed@unpredictable.fr>", "References": "<20260213034556.13471-1-mohamed@unpredictable.fr>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Proofpoint-ORIG-GUID": "cNIj7Afb4kT9UpQebrC6E2oyeumOb4De", "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwMjEzMDAyNSBTYWx0ZWRfX8lFIho0EPRpj\n ogr6Gu6J9838YPGloZfJDY9bO5fGY5mzmqR4B9T0qMRWMTovznweoNyS1whQUKVeyuVJord5ymc\n /oEcW1AUIlyzz/eztnUTMWfO950AOh1LYMdUY53KOk6diDXOfE9Ekdxb79X9kBzCf+X9Iqo4MWp\n orPfzPv1bWKmCBLV+jBeyfcih+ohUdyAgKSxumkrLyf3yK05BInFOgVcItaJmLf2bGnQAubVV7r\n 3OGAk/OCiuHq9V+LlyaSAvpbGRUm/Xq5Ya19QNWNyjHgX/5jPix5+QC+jr72E1V8QKdRJmkbyyf\n /LwIT9I4CNrvgRYhxeCrwCDFiCcOSctUawVnjn0VCgURtShmHbYkFGZU+7wBzA=", "X-Proofpoint-GUID": "cNIj7Afb4kT9UpQebrC6E2oyeumOb4De", "X-Authority-Info-Out": "v=2.4 cv=QPRlhwLL c=1 sm=1 tr=0 ts=698e9ea0\n cx=c_apl:c_apl_out:c_pps a=azHRBMxVc17uSn+fyuI/eg==:117\n a=azHRBMxVc17uSn+fyuI/eg==:17 a=HzLeVaNsDn8A:10 a=VkNPw1HP01LnGYTKEx00:22\n a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=WklI_BSY2m36_CZppDAA:9", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-02-12_05,2026-02-12_03,2025-10-01_01", "X-Proofpoint-Spam-Details": "rule=notspam policy=default score=0 mlxlogscore=999\n phishscore=0 lowpriorityscore=0 suspectscore=0\n clxscore=1030 bulkscore=0\n adultscore=0 spamscore=0 malwarescore=0 mlxscore=0 classifier=spam\n authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000\n definitions=main-2602130025", "X-JNJ": "\n AAAAAAABgZbtO77xBwNm/5KT6Ys/W//a3J9WytbP4X9T68gSIbwzsFVE2FUanxifmyop7iBbySJjr/+kg1x9MRyQhofQvFzm7VJjCUZV851b8pA38vqGQG9B4jUbviLoirJKGL9imwkID8DfYgs2JRMbCfZoS8N6kmaQjk5h7rKhs7fHdaHO1PMerA0ibexgANyyPrdKR/619FArZhmlzACTQ33J6zx9JJRxjU+wYFMzeJ8cWFQewC+BQPT6PM9Nqqy6OLMcGRm7LKJWpXyzyiVHPDjCY8DDLEYoisMB2NRaN+ZpDywn/yoXtWcxCfcM4PB+iyhAFQmBH+gMmWFS5v+xFBWNJGLT6kXeVgkw/HgcKtM/dYO8CD6aBu1QWQQ9CklTdoTHQHffHMdShRN7I5TozATJFwhzypO4E7YhxIvwLK/8Hx4Bm6u2shWre8Ht0mmJuZeuP4koxNDBq7LpSaVI1FgvpYN1C46siJ6NaGsYWQSGWq60y+EGHHCZTLPC1hJMetioaqgcwI0TgdG/+cMSUeBhjPNfZswsQwG/yYgr3sDRn/LabgoFICEXO4xa1fMJJgDf3G51powenhiLrnTz10i/5EvAuiYOBokHopdQ5VrKR4hmpvi+f/e3IwzsCE7tVTLrLb6BaQBPqYmJIIKHtEKxmgNPnYIugYAqnGJJS3VEnVu/db3JZKQZkpugLnToE4llUcrWMjN/TGZ0T7NL/jbVJw/8pGVOz8pg5gaelTBhqLY5AUOX0ufzU1O4pma37wN1ZBWTXZ4fnTii4MPwPEU4bW65rkANLtjyuBIzHahP", "Received-SPF": "pass client-ip=57.103.65.151;\n envelope-from=mohamed@unpredictable.fr; helo=outbound.pv.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,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n 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 <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>\n---\n include/system/whpx-accel-ops.h | 8 +++++---\n target/i386/whpx/whpx-all.c | 12 ++++++++++--\n 2 files changed, 15 insertions(+), 5 deletions(-)", "diff": "diff --git a/include/system/whpx-accel-ops.h b/include/system/whpx-accel-ops.h\nindex ed9d4c49f4..469a3a4350 100644\n--- a/include/system/whpx-accel-ops.h\n+++ b/include/system/whpx-accel-ops.h\n@@ -22,11 +22,13 @@ void whpx_cpu_synchronize_post_reset(CPUState *cpu);\n void whpx_cpu_synchronize_post_init(CPUState *cpu);\n void whpx_cpu_synchronize_pre_loadvm(CPUState *cpu);\n \n+/* subset of runtime state for faster returns from vmexit */\n+#define WHPX_SET_FAST_RUNTIME_STATE 1\n /* state subset only touched by the VCPU itself during runtime */\n-#define WHPX_SET_RUNTIME_STATE 1\n+#define WHPX_SET_RUNTIME_STATE 2\n /* state subset modified during VCPU reset */\n-#define WHPX_SET_RESET_STATE 2\n+#define WHPX_SET_RESET_STATE 3\n /* full state set, modified during initialization or on vmload */\n-#define WHPX_SET_FULL_STATE 3\n+#define WHPX_SET_FULL_STATE 4\n \n #endif /* TARGET_I386_WHPX_ACCEL_OPS_H */\ndiff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c\nindex 0e8fb0e72e..61251a2835 100644\n--- a/target/i386/whpx/whpx-all.c\n+++ b/target/i386/whpx/whpx-all.c\n@@ -420,6 +420,13 @@ void whpx_set_registers(CPUState *cpu, int level)\n vcxt.values[idx].Segment = whpx_seg_q2h(&env->segs[i], v86, r86);\n }\n \n+ /*\n+ * This is a hot path called on every MMIO access.\n+ */\n+ if (level <= WHPX_SET_FAST_RUNTIME_STATE) {\n+ goto skip_to_set_registers;\n+ }\n+\n assert(idx == WHvX64RegisterLdtr);\n vcxt.values[idx++].Segment = whpx_seg_q2h(&env->ldt, 0, 0);\n \n@@ -529,10 +536,11 @@ void whpx_set_registers(CPUState *cpu, int level)\n \n assert(idx == RTL_NUMBER_OF(whpx_register_names));\n \n+ skip_to_set_registers:\n hr = whp_dispatch.WHvSetVirtualProcessorRegisters(\n whpx->partition, cpu->cpu_index,\n whpx_register_names,\n- RTL_NUMBER_OF(whpx_register_names),\n+ idx,\n &vcxt.values[0]);\n \n if (FAILED(hr)) {\n@@ -771,7 +779,7 @@ static int emulate_instruction(CPUState *cpu, const uint8_t *insn_bytes, size_t\n whpx_get_registers(cpu);\n decode_instruction_stream(env, &decode, &stream);\n exec_instruction(env, &decode);\n- whpx_set_registers(cpu, WHPX_SET_RUNTIME_STATE);\n+ whpx_set_registers(cpu, WHPX_SET_FAST_RUNTIME_STATE);\n \n return 0;\n }\n", "prefixes": [ "v2", "10/10" ] }