All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harsh Prateek Bora <harshpb@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: Shivang Upadhyay <shivangu@linux.ibm.com>,
	Aditya Gupta <adityag@linux.ibm.com>,
	Amit Machhiwal <amachhiw@linux.ibm.com>
Subject: [PULL 6/7] ppc/pnv: avoid regenerating DTB if external DTB is present
Date: Fri,  3 Jul 2026 10:14:01 +0530	[thread overview]
Message-ID: <20260703044402.79723-7-harshpb@linux.ibm.com> (raw)
In-Reply-To: <20260703044402.79723-1-harshpb@linux.ibm.com>

From: Shivang Upadhyay <shivangu@linux.ibm.com>

Currently externally provided dtb is overwritten in `pnv_reset`.
Fix this by only creating dtb if not provided from `-dtb`.

Reviewed-by: Aditya Gupta <adityag@linux.ibm.com>
Signed-off-by: Shivang Upadhyay <shivangu@linux.ibm.com>
Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com>
Link: https://lore.kernel.org/qemu-devel/20260630103508.254000-2-shivangu@linux.ibm.com
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
---
 hw/ppc/pnv.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 62812f22f8..afb6019b10 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -803,9 +803,13 @@ static void pnv_reset(MachineState *machine, ResetType type)
         mpipl_write_succeeded = do_mpipl_write(pnv);
     }
 
-    /* Regenerate device tree */
-    fdt = pnv_dt_create(machine);
-    _FDT((fdt_pack(fdt)));
+    /* Only create new dt if not provided in -dtb */
+    if (!machine->dtb) {
+        fdt = pnv_dt_create(machine);
+        _FDT((fdt_pack(fdt)));
+    } else {
+        fdt = machine->fdt;
+    }
 
     /*
      * If it's a MPIPL boot, add the "mpipl-boot" property, and reset the
-- 
2.52.0



  parent reply	other threads:[~2026-07-03  4:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-03  4:43 [PULL 0/7] ppc queue Harsh Prateek Bora
2026-07-03  4:43 ` [PULL 2/7] Revert "hw/ppc: Deprecate 405 CPUs" Harsh Prateek Bora
2026-07-03  4:43 ` [PULL 3/7] hw/pci-host: Split PowerNV PHB5 code from PHB4 files Harsh Prateek Bora
2026-07-03  4:43 ` [PULL 4/7] target/ppc: Expose the TB offset of the guest in QEMU monitor Harsh Prateek Bora
2026-07-03  4:44 ` [PULL 5/7] docs/system/ppc/pseries: Update the link to the SLOF repository Harsh Prateek Bora
2026-07-03  4:44 ` Harsh Prateek Bora [this message]
2026-07-03  4:44 ` [PULL 7/7] ppc/pnv: add test to verify external DTB is honored Harsh Prateek Bora
2026-07-03  4:57 ` [PULL 0/7] ppc queue Harsh Prateek Bora
2026-07-05 17:57 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260703044402.79723-7-harshpb@linux.ibm.com \
    --to=harshpb@linux.ibm.com \
    --cc=adityag@linux.ibm.com \
    --cc=amachhiw@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=shivangu@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.