Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217712/?format=api
{ "id": 2217712, "url": "http://patchwork.ozlabs.org/api/patches/2217712/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260330115017.256211-13-pbonzini@redhat.com/", "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": "<20260330115017.256211-13-pbonzini@redhat.com>", "list_archive_url": null, "date": "2026-03-30T11:50:16", "name": "[PULL,12/12] hw/acpi: Do not save/load cpuhp state unconditionally", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "be53ae29d46426e3222676573edd5e2f68f4e06b", "submitter": { "id": 2701, "url": "http://patchwork.ozlabs.org/api/people/2701/?format=api", "name": "Paolo Bonzini", "email": "pbonzini@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260330115017.256211-13-pbonzini@redhat.com/mbox/", "series": [ { "id": 498008, "url": "http://patchwork.ozlabs.org/api/series/498008/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498008", "date": "2026-03-30T11:50:04", "name": "[PULL,01/12] meson.build: remove i386-softmmu WHPX support", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498008/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2217712/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2217712/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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=hnjfwfS3;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=d3wFWdva;\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 4fkqQk2DTFz1yG8\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 30 Mar 2026 22:53:50 +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 1w7BBI-00064e-Kb; Mon, 30 Mar 2026 07:53:21 -0400", "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 <pbonzini@redhat.com>)\n id 1w7B8z-0003h8-9Y\n for qemu-devel@nongnu.org; Mon, 30 Mar 2026 07:51:06 -0400", "from us-smtp-delivery-124.mimecast.com ([170.10.133.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1w7B8v-0005yu-IO\n for qemu-devel@nongnu.org; Mon, 30 Mar 2026 07:50:56 -0400", "from mail-wr1-f70.google.com (mail-wr1-f70.google.com\n [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-516-S4hE5z2sNOmfK0UxEN2ekA-1; Mon, 30 Mar 2026 07:50:51 -0400", "by mail-wr1-f70.google.com with SMTP id\n ffacd0b85a97d-43ba02dc34bso2467114f8f.1\n for <qemu-devel@nongnu.org>; Mon, 30 Mar 2026 04:50:51 -0700 (PDT)", "from [192.168.10.48] ([151.49.85.67])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43cf21e265fsm19207747f8f.1.2026.03.30.04.50.47\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 30 Mar 2026 04:50:47 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1774871452;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=GfpuJ19t/UpPzsDmyGWAHDp6zIk3S1l1GzeSUE0fPeA=;\n b=hnjfwfS3jMbRjzZmOKiMjsd/pV9M0seYE2vTYBgowczH4JQtlCdH6FrrC34vvxurEL40Bg\n nnhf5fS2PQhynr4mLIGypRyAGSknBLm+D9An9sJ98+zDG77+X6pOjR0LkpscbVq212B+WZ\n tErt4Yi8yNIJ9PKpuRZuQ9agS9Xk9Qg=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1774871450; x=1775476250; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=GfpuJ19t/UpPzsDmyGWAHDp6zIk3S1l1GzeSUE0fPeA=;\n b=d3wFWdvaw8hxpIJEj8daUd8KTRkLCXBS9xwRmbdyMBy1XLPCfsp4XM98hy/znMhYk8\n 514FY+IVeEdIukOa0+gO2uV6swnatqfMRsd7FFD34N6mSFBScLf4SszTFYi1vflnE99f\n jAoA3pB4w6WruOJmAVF3icbR58mihhPbggX5mf4gnvI479zRZnkEB43VNVQMRcr0RQhx\n MJiOhWROekjXBpS7qge25U/lE0y9FSkbp+E00dSj7a8mRFilYMJTSzDnnlsSyRWyUIN8\n d9eNKCu724tomBUGmxAzCneCrCkYHuX2eaOpxml9Z6dHQ1p337B7pTMtb0nzwsJ/1t9g\n wSlQ==" ], "X-MC-Unique": "S4hE5z2sNOmfK0UxEN2ekA-1", "X-Mimecast-MFC-AGG-ID": "S4hE5z2sNOmfK0UxEN2ekA_1774871450", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774871450; x=1775476250;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=GfpuJ19t/UpPzsDmyGWAHDp6zIk3S1l1GzeSUE0fPeA=;\n b=Ruj1B7l3zQWZ5e0Sx3xWXl4/mzgTvsYHF2xaRe1cEvfkqH8D2eYi/Mil9TMA5jXJX2\n wtAKMLA+0yBtzTclZMoab22+CzQTMGwpsvngGeLWI+fWk8m22/07+m6hdJKLSIDAWNUt\n KM6u83+F2OcceHGRDqnjgVFWTZfgKXANQmgFA7BAmTOOt8S7LupwCm+4Bf9i2EjC5asj\n Ums3DH1ktP8vRULxtAF3Jbz3mZ0I0bUDnviN/UZqF6uLTTqvwvNjIDecRU4wqKA+MtpD\n 1rPKasW7oGm3ZaohYcnuzFawHxXa3pnklJYbVlsPsK2KBnlyt575EGIRaIEr2KJgfpir\n HztA==", "X-Gm-Message-State": "AOJu0YxpWsmK8Sp9yfkPvdNem1PYRkj+0wDs7qyRuX+TOYlGo3HOA7+3\n 1nEwevYGp5HMkoVeT31wga7JENbBQG/ivKnKUNbZjHrIp9rMF3XJ7sCbyZ2RKF4gsTB+HxcFVtc\n S0BOmyDlkmzUuxNa6dFD/pWmXBB0CyeSbBwkeVTtII5okpuqx7rraBl9dLRuLFxpWVyNwkV0gWE\n WF9fM/sV6lTf5pCJmpqCx1pPWGij3NUpV7trW1oJml", "X-Gm-Gg": "ATEYQzwmfl47uqF50XsQH8/uVttdWva2HOiCM3a81xj+gqAJWmMeN4/EzmrtbzRTENp\n eLHgjaKWMkNwwNY7EtgSGeugRoLNQIeW1Wvp2kOK6PIvZHohusDYsknMsKPbrEwo4Kglo28Yx1q\n b3e0cXygsG9HWVurstVUSFekRCOOHgd2QDFInLnzTXeutKLm8H7QNxRBw5MUSdFY4l0oNaSwQnF\n qq8XL+s+DORY9CVY9eSgazbPsRLRYlMBBT0sRYooGCQt1bLLdYUrgTOyYwNoFXOpFPaKLczKp/i\n eFBN9hnV1V3r3aeH/8dbM4CowkssrCaPSTwp72MHqn9yWU2bxL0YAKuTkTJIuwjeoFTGINsq5Io\n 6PZMVXfQN9aQxdl/XeUeGAnAlAyQBKR488likPiDXd0actn1b1dBIv+Sqw7kLLwk7cYwseuXdz+\n 2MuEPRMCRuxZhDFsyEYTyMvcPC", "X-Received": [ "by 2002:a5d:5f86:0:b0:43d:533:9559 with SMTP id\n ffacd0b85a97d-43d05339842mr1762381f8f.19.1774871449650;\n Mon, 30 Mar 2026 04:50:49 -0700 (PDT)", "by 2002:a5d:5f86:0:b0:43d:533:9559 with SMTP id\n ffacd0b85a97d-43d05339842mr1762300f8f.19.1774871448976;\n Mon, 30 Mar 2026 04:50:48 -0700 (PDT)" ], "From": "Paolo Bonzini <pbonzini@redhat.com>", "To": "qemu-devel@nongnu.org", "Cc": "Zhao Liu <zhao1.liu@intel.com>,\n\tPeter Maydell <peter.maydell@linaro.org>", "Subject": "[PULL 12/12] hw/acpi: Do not save/load cpuhp state unconditionally", "Date": "Mon, 30 Mar 2026 13:50:16 +0200", "Message-ID": "<20260330115017.256211-13-pbonzini@redhat.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260330115017.256211-1-pbonzini@redhat.com>", "References": "<20260330115017.256211-1-pbonzini@redhat.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=170.10.133.124;\n envelope-from=pbonzini@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com", "X-Spam_score_int": "-6", "X-Spam_score": "-0.7", "X-Spam_bar": "/", "X-Spam_report": "(-0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.01,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1,\n 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 <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": "From: Zhao Liu <zhao1.liu@intel.com>\n\nCommit 7aa563630b6b (\"pc: Start with modern CPU hotplug interface\nby default\") removed the .needed callback (vmstate_test_use_cpuhp)\nfrom vmstate_cpuhp_state in both piix4.c and ich9.c.\n\nHowever, PIIX4 is also used by non-PC boards - MIPS Malta, which does\nnot select CONFIG_ACPI_CPU_HOTPLUG. For MIPS Malta, the linker resolves\nvmstate_cpu_hotplug to the stub one in acpi-cpu-hotplug-stub.c, which is\na zero-initialized VMStateDescription with .fields == NULL.\n\nBefore commit 7aa563630b6b, .needed() of PIIX4's vmstate_cpuhp_state\nreturned false for MIPS Malta since PIIX4PMState always initialized the\nfield cpu_hotplug_legacy as true. Malta implicitly relies on this\ninitial value to bypass vmstate_cpuhp_state. However, this is unstable\nbecause Malta itself does not support CPU hotplugging, whether via the\nlegacy way or the modern way.\n\nCommit 7aa563630b6b removed .needed() check for vmstate_cpuhp_state,\nthis broke the existing dependency that Malta had relied on, forcing\nMalta to save and load vmstate_cpuhp_state during the save/load process,\nwhich in turn caused a segmentation fault due to NULL fields in the\nstub-compiled code.\n\nFix this by bringing back the .needed = cpuhp_needed callback for\nvmstate_cpuhp_state of PIIX4, that checks\nMachineClass::has_hotpluggable_cpus. Boards that do not support CPU\nhotplug (only MIPS Malta) will skip this subsection entirely, which\nis both correct and consistent with the previous behavior.\n\nAt the same time, add a similar .needed() check to ICH9. Although no\nboards with ICH9 are affected by this issue, this helps avoid potential\nissues in the future.\n\nReproducer (MIPS Malta):\n $ qemu-img create -f qcow2 dummy.qcow2 32M\n $ qemu-system-mipsel -nographic \\\n -drive if=none,format=qcow2,file=dummy.qcow2\n [Type \"C-a c\" to get the \"(qemu)\" monitor prompt)]\n (qemu) savevm foo # segfault\n\nReported-by: Peter Maydell <peter.maydell@linaro.org>\nFixes: 7aa563630b6b (\"pc: Start with modern CPU hotplug interface by default\")\nSigned-off-by: Zhao Liu <zhao1.liu@intel.com>\nResolves: https://gitlab.com/qemu-project/qemu/-/work_items/3360\nTested-by: Peter Maydell <peter.maydell@linaro.org>\nLink: https://lore.kernel.org/r/20260330053008.2721532-1-zhao1.liu@intel.com\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n---\n hw/acpi/ich9.c | 8 ++++++++\n hw/acpi/piix4.c | 8 ++++++++\n 2 files changed, 16 insertions(+)", "diff": "diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c\nindex bbb1bd60a20..5c7dfb2c69d 100644\n--- a/hw/acpi/ich9.c\n+++ b/hw/acpi/ich9.c\n@@ -184,10 +184,18 @@ static const VMStateDescription vmstate_tco_io_state = {\n }\n };\n \n+static bool cpuhp_needed(void *opaque)\n+{\n+ MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());\n+\n+ return mc->has_hotpluggable_cpus;\n+}\n+\n static const VMStateDescription vmstate_cpuhp_state = {\n .name = \"ich9_pm/cpuhp\",\n .version_id = 1,\n .minimum_version_id = 1,\n+ .needed = cpuhp_needed,\n .fields = (const VMStateField[]) {\n VMSTATE_CPU_HOTPLUG(cpuhp_state, ICH9LPCPMRegs),\n VMSTATE_END_OF_LIST()\ndiff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c\nindex 43860d12278..9b7f50c7afa 100644\n--- a/hw/acpi/piix4.c\n+++ b/hw/acpi/piix4.c\n@@ -195,10 +195,18 @@ static const VMStateDescription vmstate_memhp_state = {\n }\n };\n \n+static bool cpuhp_needed(void *opaque)\n+{\n+ MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());\n+\n+ return mc->has_hotpluggable_cpus;\n+}\n+\n static const VMStateDescription vmstate_cpuhp_state = {\n .name = \"piix4_pm/cpuhp\",\n .version_id = 1,\n .minimum_version_id = 1,\n+ .needed = cpuhp_needed,\n .fields = (const VMStateField[]) {\n VMSTATE_CPU_HOTPLUG(cpuhp_state, PIIX4PMState),\n VMSTATE_END_OF_LIST()\n", "prefixes": [ "PULL", "12/12" ] }