diff options
| author | Shivang Upadhyay <shivangu@linux.ibm.com> | 2026-06-30 16:05:07 +0530 |
|---|---|---|
| committer | Harsh Prateek Bora <harshpb@linux.ibm.com> | 2026-07-03 10:07:21 +0530 |
| commit | 55db0113c38997c9c969c8260adb18c6d2982929 (patch) | |
| tree | 5b7b55ea817d650dd414d7a4c250936caa854579 | |
| parent | 75f3c97476454f735f85c77a3183856be7ba0c4c (diff) | |
| download | qemu-55db0113c38997c9c969c8260adb18c6d2982929.tar.gz qemu-55db0113c38997c9c969c8260adb18c6d2982929.zip | |
ppc/pnv: avoid regenerating DTB if external DTB is present
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>
| -rw-r--r-- | hw/ppc/pnv.c | 10 |
1 files 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 |
