On 26/06/26 04:52PM, Shivang Upadhyay wrote: > Currently externally provided dtb is overwritten in `pnv_reset`. > Fix this by only creating dtb if not provided from `-dtb`. > > Signed-off-by: Shivang Upadhyay <[email protected]> > --- > 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..e44fb7e2dc 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; > + }
nit: indent is wrong with indentation fixed, feel free to add: Reviewed-by: Aditya Gupta <[email protected]> - Aditya G
