Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218127/?format=api
{ "id": 2218127, "url": "http://patchwork.ozlabs.org/api/patches/2218127/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260331131514.21152-2-philmd@linaro.org/", "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": "<20260331131514.21152-2-philmd@linaro.org>", "list_archive_url": null, "date": "2026-03-31T13:15:03", "name": "[PULL,01/11] ppc/pnv: generate dtb after machine initialization is complete", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "3c37fe5f415bc9701597f114e883e208bc359294", "submitter": { "id": 85046, "url": "http://patchwork.ozlabs.org/api/people/85046/?format=api", "name": "Philippe Mathieu-Daudé", "email": "philmd@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260331131514.21152-2-philmd@linaro.org/mbox/", "series": [ { "id": 498197, "url": "http://patchwork.ozlabs.org/api/series/498197/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498197", "date": "2026-03-31T13:15:02", "name": "[PULL,01/11] ppc/pnv: generate dtb after machine initialization is complete", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498197/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218127/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218127/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=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=U8yAYFmm;\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 4flTC1686Xz1yGT\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 00:15:57 +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 1w7YwV-0005dN-22; Tue, 31 Mar 2026 09:15:40 -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 <philmd@linaro.org>) id 1w7YwN-0005aQ-1J\n for qemu-devel@nongnu.org; Tue, 31 Mar 2026 09:15:31 -0400", "from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1w7YwL-00046V-5F\n for qemu-devel@nongnu.org; Tue, 31 Mar 2026 09:15:30 -0400", "by mail-wr1-x42b.google.com with SMTP id\n ffacd0b85a97d-43d03db7f87so1073704f8f.3\n for <qemu-devel@nongnu.org>; Tue, 31 Mar 2026 06:15:28 -0700 (PDT)", "from localhost.localdomain (43.149.216.82.rev.sfr.net.\n [82.216.149.43]) by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43cf21eb95fsm28884567f8f.12.2026.03.31.06.15.25\n for <qemu-devel@nongnu.org>\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Tue, 31 Mar 2026 06:15:25 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1774962927; x=1775567727; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:from:to:cc:subject:date:message-id\n :reply-to; bh=Bw5zi+GqCLVgCNxjiWNzvFBMTLyZs23V3pNqG3hK1yo=;\n b=U8yAYFmmZWszi7FZHk8qdW6lgKnmjMC5voQ64W+I8M71co0UjdnA3aTo936xZPNG/Q\n dCvJ+UGVYX5nOghu2y51K/dr3qd6QmzSgWsmnA1V1S2BJS8+FBMGb6CExFPjVVYCbkG8\n ImuOKSGG4TXwrX44+mdOQqIoWFdVh7cGaGV3RxnaTTatoloRJi3d9LCQrYfljkWd0ory\n 8clEXHdPulzZ89/BXS5ME4yG9lJU6bMRJ4X4eJ4JZwfGbGobIM9HbvHf7LEqzB1JGklj\n VqZG69mY7rUO5Q/BFxQKXqwVO/Rj3AXSj08Fs2U1kc+yhssF7orCNdn3s0TMdz5+v6vS\n Jfnw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774962927; x=1775567727;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=Bw5zi+GqCLVgCNxjiWNzvFBMTLyZs23V3pNqG3hK1yo=;\n b=ihVRO9spboOyTW4mA972anoJCnQAUQkV8eZm8CeaEO+LkIgaLuZPyscLsa6FEB8YIY\n 4Qlyajsl9SwPAiFHBz4UnSFT5ZUyCFVNd7Mg2YBE1NPoz4hIbiokbqyFmt1a59m9S7YS\n gCE7EvyTsfKFvkqIEaB4DmEZGiNthbP6HuGMYnDNLjuWaIP83LnrAXwr9Ymxm7Gn1ksc\n VpwE6qcSJYU47MUa28FGnbZUfbzPUkUF97FTZtTL09buGmdpoWwNiNpf+BiRgj377cy6\n jOefdJ6WulDa9KtK+HghUMmAvT5FFhunF++aO1juB/EdRt7QQ5jjSCJDvWBAcyUBMqNJ\n qIFw==", "X-Gm-Message-State": "AOJu0YyzAd2sxrSH1xoBhcOzCUJICn7gbdkKOGOZDYesLhUmWK+4z1hW\n cQoikS+6fQG8P28jigiescxUPExDRtrDuk5rSUG1zgUdTPW60XlAB8gkyc8usWlbTTe3hOtq7AB\n 4ixoVFDE=", "X-Gm-Gg": "ATEYQzyrPbY9tcUeM/kZA2Mrqi2gUKizL+PGVZfcgpIy7A5TUofXRdXWXEO2IKK8h5u\n PY3amU4sR2pMiTSOruCG16lkxjsUoXCjQldB+24ofGbxfhTZ46JXEwR8V0N5QB98LAhWksw/pEe\n LTFGSzsd7EeyWj0qELU5Xy7u7I9dZK9Q5Vd7JyKh1SWX6JPJKljlBNvX58ByArK072x+DekfCqd\n ZeLRCsVciMNL6AFXJxtz2gNFWDHaDbZ62ApZ67YZuZOPucY+//Sxrh+29144bJNv5eRLLikuq1A\n Mrk2cTVRnkkCt+o7hKiXy6JgqyyoZUerOiyodyBhnZqmoJWNX+w29Kx+dB8EG6gKrvsEoF+Is6n\n beZEuUqBg2V9bOUSiPMzpvHXO3jbob8t3X5yw2ptExg7H3xjAQTLSNn6sgX8M/8yZqkRtsuin0F\n a8W1MtY86jhDI85o8ocE4MZ+EKTFxhLZRBSf7CO+KxasMhllZqEQJv1FMvFQVj/67J8PQ=", "X-Received": "by 2002:a05:6000:178a:b0:43c:f49f:9b7d with SMTP id\n ffacd0b85a97d-43cf49f9cdemr20519067f8f.17.1774962926486;\n Tue, 31 Mar 2026 06:15:26 -0700 (PDT)", "From": "=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>", "To": "qemu-devel@nongnu.org", "Subject": "[PULL 01/11] ppc/pnv: generate dtb after machine initialization is\n complete", "Date": "Tue, 31 Mar 2026 15:15:03 +0200", "Message-ID": "<20260331131514.21152-2-philmd@linaro.org>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260331131514.21152-1-philmd@linaro.org>", "References": "<20260331131514.21152-1-philmd@linaro.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2a00:1450:4864:20::42b;\n envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.google.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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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": "From: Shivang Upadhyay <shivangu@linux.ibm.com>\n\nCurrently, the machine dtb is generated in pnv_init(), before all devices\nare fully initialized. This can result in an incomplete dtb for the system,\nas seen in bug [1].\n\nFix this by deferring dtb generation until machine initialization is complete,\nusing the machine_init_done_notifier hook.\n\n[1] https://lore.kernel.org/all/20260323231612.GA2637687@ax162/\n\nCc: Aditya Gupta <adityag@linux.ibm.com>\nCc: Harsh Prateek Bora <harshpb@linux.ibm.com>\nCc: BALATON Zoltan <balaton@eik.bme.hu>\nCc: qemu-stable@nongnu.org\nReported-by: Nathan Chancellor <nathan@kernel.org>\nSuggested-by: Peter Maydell <peter.maydell@linaro.org>\nFixes: a16d4c2f162a86d (\"ppc/pnv: fix dumpdtb option\")\nSigned-off-by: Shivang Upadhyay <shivangu@linux.ibm.com>\nTested-by: Nathan Chancellor <nathan@kernel.org>\nReviewed-by: Aditya Gupta <adityag@linux.ibm.com>\nReviewed-by: Peter Maydell <peter.maydell@linaro.org>\nMessage-ID: <20260327124136.983955-1-shivangu@linux.ibm.com>\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\n---\n include/hw/ppc/pnv.h | 2 ++\n hw/ppc/pnv.c | 58 +++++++++++++++++++++++++-------------------\n 2 files changed, 35 insertions(+), 25 deletions(-)", "diff": "diff --git a/include/hw/ppc/pnv.h b/include/hw/ppc/pnv.h\nindex 24f8843a409..90028f974da 100644\n--- a/include/hw/ppc/pnv.h\n+++ b/include/hw/ppc/pnv.h\n@@ -111,6 +111,8 @@ struct PnvMachineState {\n \n bool big_core;\n bool lpar_per_core;\n+\n+ Notifier machine_init_done;\n };\n \n PnvChip *pnv_get_chip(PnvMachineState *pnv, uint32_t chip_id);\ndiff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c\nindex 7e54b6bc604..524563dcfc2 100644\n--- a/hw/ppc/pnv.c\n+++ b/hw/ppc/pnv.c\n@@ -748,31 +748,10 @@ static void pnv_powerdown_notify(Notifier *n, void *opaque)\n \n static void pnv_reset(MachineState *machine, ResetType type)\n {\n- PnvMachineState *pnv = PNV_MACHINE(machine);\n- IPMIBmc *bmc;\n void *fdt;\n \n qemu_devices_reset(type);\n \n- /*\n- * The machine should provide by default an internal BMC simulator.\n- * If not, try to use the BMC device that was provided on the command\n- * line.\n- */\n- bmc = pnv_bmc_find(&error_fatal);\n- if (!pnv->bmc) {\n- if (!bmc) {\n- if (!qtest_enabled()) {\n- warn_report(\"machine has no BMC device. Use '-device \"\n- \"ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10' \"\n- \"to define one\");\n- }\n- } else {\n- pnv_bmc_set_pnor(bmc, pnv->pnor);\n- pnv->bmc = bmc;\n- }\n- }\n-\n fdt = machine->fdt;\n cpu_physical_memory_write(PNV_FDT_ADDR, fdt, fdt_totalsize(fdt));\n }\n@@ -984,6 +963,37 @@ static uint64_t pnv_chip_get_ram_size(PnvMachineState *pnv, int chip_id)\n return chip_id == 0 ? 1 * GiB : QEMU_ALIGN_DOWN(ram_per_chip, 1 * MiB);\n }\n \n+static void pnv_machine_init_done(Notifier *notifier, void *data)\n+{\n+ PnvMachineState *pnv = container_of(notifier, PnvMachineState, machine_init_done);\n+ MachineState *machine = MACHINE(pnv);\n+ IPMIBmc *bmc;\n+\n+ /*\n+ * The machine should provide by default an internal BMC simulator.\n+ * If not, try to use the BMC device that was provided on the command\n+ * line.\n+ */\n+ bmc = pnv_bmc_find(&error_fatal);\n+ if (!pnv->bmc) {\n+ if (!bmc) {\n+ if (!qtest_enabled()) {\n+ warn_report(\"machine has no BMC device. Use '-device \"\n+ \"ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10' \"\n+ \"to define one\");\n+ }\n+ } else {\n+ pnv_bmc_set_pnor(bmc, pnv->pnor);\n+ pnv->bmc = bmc;\n+ }\n+ }\n+\n+ if (!machine->fdt) {\n+ machine->fdt = pnv_dt_create(machine);\n+ _FDT((fdt_pack(machine->fdt)));\n+ }\n+}\n+\n static void pnv_init(MachineState *machine)\n {\n const char *bios_name = machine->firmware ?: FW_FILE_NAME;\n@@ -1244,10 +1254,8 @@ static void pnv_init(MachineState *machine)\n pmc->i2c_init(pnv);\n }\n \n- if (!machine->fdt) {\n- machine->fdt = pnv_dt_create(machine);\n- _FDT((fdt_pack(machine->fdt)));\n- }\n+ pnv->machine_init_done.notify = pnv_machine_init_done;\n+ qemu_add_machine_init_done_notifier(&pnv->machine_init_done);\n }\n \n /*\n", "prefixes": [ "PULL", "01/11" ] }