Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2225943/?format=api
{ "id": 2225943, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2225943/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260421205749.55060-1-mohamed@unpredictable.fr/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.1/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": "" }, "msgid": "<20260421205749.55060-1-mohamed@unpredictable.fr>", "date": "2026-04-21T20:57:49", "name": "[v2] whpx: i386, arm: do partition reset on boot CPU reset", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "fdfcd075c0aea26dc4a70dc8156913d7eecdbdc7", "submitter": { "id": 91318, "url": "http://patchwork.ozlabs.org/api/1.1/people/91318/?format=api", "name": "Mohamed Mediouni", "email": "mohamed@unpredictable.fr" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260421205749.55060-1-mohamed@unpredictable.fr/mbox/", "series": [ { "id": 500893, "url": "http://patchwork.ozlabs.org/api/1.1/series/500893/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=500893", "date": "2026-04-21T20:57:49", "name": "[v2] whpx: i386, arm: do partition reset on boot CPU reset", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/500893/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2225943/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2225943/checks/", "tags": {}, "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=bd0Gv01M;\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=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.gnu.org (lists1p.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 4g0ZT06ZFlz1yHm\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 06:58:27 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wFIAU-0005RM-LZ; Tue, 21 Apr 2026 16:58:02 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.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 1wFIAS-0005Qq-Bh\n for qemu-devel@nongnu.org; Tue, 21 Apr 2026 16:58:00 -0400", "from ci-2006b-snip4-2.eps.apple.com ([57.103.90.143]\n helo=outbound.ci.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 1wFIAQ-0004KA-CD\n for qemu-devel@nongnu.org; Tue, 21 Apr 2026 16:58:00 -0400", "from outbound.ci.icloud.com (unknown [127.0.0.2])\n by p00-icloudmta-asmtp-us-central-1k-10-percent-1 (Postfix) with ESMTPS id\n 75F6B1804007; Tue, 21 Apr 2026 20:57:54 +0000 (UTC)", "from localhost.localdomain (unknown [17.57.156.36])\n by p00-icloudmta-asmtp-us-central-1k-10-percent-1 (Postfix) with ESMTPSA id\n 7F0501802247; Tue, 21 Apr 2026 20:57:52 +0000 (UTC)" ], "X-ICL-Out-Info": "\n HUtFAUMHWwJACUgBTUQeDx5WFlZNRAJCTQFIHV8DWRxBAUkdXw9LVxQEFVwFVgZXFHkNXR1FDlYZWgxSD1sOHBZLWFUJCgZdGFgVVgl3HlwASx1XBFQfUxJVHR0LRUtAEwRAEwVSB11NVg1HD1geXBQXG1pDXgheH0wcHQ5YBhIATQoONgZZBV4JVgNDBTYSFF1FRgNHGVcUUBtHDFUHV15fChMAXg8PTAtIAVsHXwBBC0gGWgNSHEUMSAVdGlofHVYQUgBSD3IFVwhBCFMCUQRYGl8IGQ1AThkMSh1SVlEFSgxcAGgPXR1YEV0=", "Dkim-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr;\n s=sig1; t=1776805077; x=1779397077;\n bh=AA2GyBDfQU9JiPZHjI7BgDdjKn1yOhmHMSXqZ30JiyU=;\n h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme;\n b=bd0Gv01MnA+mBVjyZPqLi2pzfoqY37xR2k1AW/Q8ImbgO0XxPxD0xkRlbzq42PLKvbDb6eubgk6zCCbXyMRuA+wLyl3dwbYGplJI76L0F1TvQ0GC+RG5SKhmRbwRw1+4w6A1eBQA4WHutVJArrFLtgrG94PGS/mR2JQivWovJ8ICYXJ2rV6KTV19UnKH/sm6fCjnDN4Y0j40Cu+DTIBwFfO94lptWC29u00t7mzyyN3tlsxBuX1GUXZFLL+lRy430zQxpG7bwQGfaDbyza4bDAMqjQcKv5Ls2xzmAEa1QoimKYn3Pb5a1toCaXmU81NcHUhC1uJXJPlyXXPqoLMiMw==", "mail-alias-created-date": "1752046281608", "From": "Mohamed Mediouni <mohamed@unpredictable.fr>", "To": "qemu-devel@nongnu.org", "Cc": "Richard Henderson <richard.henderson@linaro.org>,\n Pedro Barbuda <pbarbuda@microsoft.com>,\n Peter Maydell <peter.maydell@linaro.org>, qemu-arm@nongnu.org,\n Mohamed Mediouni <mohamed@unpredictable.fr>,\n Paolo Bonzini <pbonzini@redhat.com>,\n =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>", "Subject": "[PATCH v2] whpx: i386, arm: do partition reset on boot CPU reset", "Date": "Tue, 21 Apr 2026 22:57:49 +0200", "Message-ID": "<20260421205749.55060-1-mohamed@unpredictable.fr>", "X-Mailer": "git-send-email 2.50.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Proofpoint-GUID": "7rGu11PmTAcn8WgmtzLL17amlyXhdUIa", "X-Authority-Info-Out": "v=2.4 cv=e7MLiKp/ c=1 sm=1 tr=0 ts=69e7e4d3\n cx=c_apl:c_pps:t_out a=2G65uMN5HjSv0sBfM2Yj2w==:117\n a=2G65uMN5HjSv0sBfM2Yj2w==:17 a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=KtJ61neEzk59qg8Kb1kA:9", "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDIxMDIwOCBTYWx0ZWRfX8qfa+kPDyCtz\n tFjPIQLWlQTaBkL7bFxNKSfIwzGt0vmcQZsJBs6bIriGLplldrluF5FO086rIqxt8oNA+16iyK+\n SynUlDJMS3mQrLySyKg6yddmgQWGaSwDtmAwKa2353+Tt1lqnvvXLoX9FWj/w7diHRrMP6Bmf+k\n yG7ZNVeTs6dpBYqGwG2ky/OMrdqRzVbz2CxnyC8OyV4wMS02zjhSrtnP0IUWWZyqEUPK2ywab+Y\n HdYAjfoJWXycwXBTok4+179ZdkjCojt5m4PX8N6DN9pkt9o3tx1du6/USgQc+025t1W4mEDPB9i\n vAVu+DtGxCLJQzzM3PZdBLX8HqialoyV7ClS7BhiXJk0vIXgI6opLA4EiR17Y0=", "X-Proofpoint-ORIG-GUID": "7rGu11PmTAcn8WgmtzLL17amlyXhdUIa", "Received-SPF": "pass client-ip=57.103.90.143;\n 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,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n SPF_HELO_PASS=-0.001,\n 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": "WHvResetPartition resets partition state, and is not supported on Windows 10.\n\nOn Arm, it's supposed to be used for reboots. The prior location of the\nWHvResetPartition call wasn't right, as other vCPUs might still have\nbeen running, causing the call to fail.\n\nSigned-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>\n---\n accel/accel-system.c | 9 +++++++++\n accel/whpx/whpx-common.c | 13 +++++++++++++\n include/accel/accel-ops.h | 1 +\n include/qemu/accel.h | 3 +++\n system/runstate.c | 5 +++++\n target/arm/whpx/whpx-all.c | 2 --\n 6 files changed, 31 insertions(+), 2 deletions(-)", "diff": "diff --git a/accel/accel-system.c b/accel/accel-system.c\nindex 150af05bf5..5352ccd937 100644\n--- a/accel/accel-system.c\n+++ b/accel/accel-system.c\n@@ -75,6 +75,15 @@ void accel_pre_resume(MachineState *ms, bool step_pending)\n }\n }\n \n+void accel_reset(MachineState *ms)\n+{\n+ AccelState *accel = ms->accelerator;\n+ AccelClass *acc = ACCEL_GET_CLASS(accel);\n+ if (acc->reset_vm) {\n+ acc->reset_vm(accel);\n+ }\n+}\n+\n /* initialize the arch-independent accel operation interfaces */\n void accel_init_ops_interfaces(AccelClass *ac)\n {\ndiff --git a/accel/whpx/whpx-common.c b/accel/whpx/whpx-common.c\nindex 6fe44d5910..1f7b7d764d 100644\n--- a/accel/whpx/whpx-common.c\n+++ b/accel/whpx/whpx-common.c\n@@ -205,6 +205,18 @@ static void do_whpx_cpu_synchronize_pre_loadvm(CPUState *cpu,\n cpu->vcpu_dirty = true;\n }\n \n+/*\n+ * Partition support\n+ */\n+\n+static void whpx_partition_reset(AccelState* as)\n+{\n+ struct whpx_state *whpx = &whpx_global;\n+ if (whp_dispatch.WHvResetPartition) {\n+ whp_dispatch.WHvResetPartition(whpx->partition);\n+ }\n+}\n+\n /*\n * CPU support.\n */\n@@ -622,6 +634,7 @@ static void whpx_accel_class_init(ObjectClass *oc, const void *data)\n ac->name = \"WHPX\";\n ac->init_machine = whpx_accel_init;\n ac->pre_resume_vm = whpx_pre_resume_vm;\n+ ac->reset_vm = whpx_partition_reset;\n ac->allowed = &whpx_allowed;\n \n object_class_property_add(oc, \"kernel-irqchip\", \"on|off|split\",\ndiff --git a/include/accel/accel-ops.h b/include/accel/accel-ops.h\nindex f46492e3fe..a1c9f3ae7b 100644\n--- a/include/accel/accel-ops.h\n+++ b/include/accel/accel-ops.h\n@@ -33,6 +33,7 @@ struct AccelClass {\n /* system related hooks */\n void (*setup_post)(AccelState *as);\n void (*pre_resume_vm)(AccelState *as, bool step_pending);\n+ void (*reset_vm)(AccelState *as);\n bool (*has_memory)(AccelState *accel, AddressSpace *as,\n hwaddr start_addr, hwaddr size);\n \ndiff --git a/include/qemu/accel.h b/include/qemu/accel.h\nindex d3638c7bfd..0e12aea7db 100644\n--- a/include/qemu/accel.h\n+++ b/include/qemu/accel.h\n@@ -54,6 +54,9 @@ void accel_setup_post(MachineState *ms);\n \n void accel_pre_resume(MachineState *ms, bool step_pending);\n \n+/* Reset accelerator state. */\n+void accel_reset(MachineState *ms);\n+\n /**\n * accel_cpu_instance_init:\n * @cpu: The CPU that needs to do accel-specific object initializations.\ndiff --git a/system/runstate.c b/system/runstate.c\nindex 2d4e95a216..734e3c037c 100644\n--- a/system/runstate.c\n+++ b/system/runstate.c\n@@ -564,6 +564,11 @@ void qemu_system_reset(ShutdownCause reason)\n qapi_event_send_reset(shutdown_caused_by_guest(reason), reason);\n }\n \n+ if (current_machine) {\n+ /* Tell the accelerator that the VM is being reset. */\n+ accel_reset(current_machine);\n+ }\n+\n /*\n * Some boards use the machine reset callback to point CPUs to the firmware\n * entry point. Assume that this is not the case for boards that support\ndiff --git a/target/arm/whpx/whpx-all.c b/target/arm/whpx/whpx-all.c\nindex 4019a513aa..f345fea4fe 100644\n--- a/target/arm/whpx/whpx-all.c\n+++ b/target/arm/whpx/whpx-all.c\n@@ -472,8 +472,6 @@ int whpx_vcpu_run(CPUState *cpu)\n if (arm_cpu->power_state != PSCI_OFF) {\n whpx_psci_cpu_off(arm_cpu);\n }\n- /* Partition-wide reset, to reset state for reboots to succeed. */\n- whp_dispatch.WHvResetPartition(whpx->partition);\n bql_unlock();\n break;\n case WHvRunVpExitReasonNone:\n", "prefixes": [ "v2" ] }