From: Nicholas Piggin Date: Tue, 8 Aug 2023 04:19:44 +0000 (+1000) Subject: ppc/vof: Fix missed fields in VOF cleanup X-Git-Tag: v7.2.6~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86b40ee537e7d73d30c8d5ee69e22f398fbcd6c5;p=thirdparty%2Fqemu.git ppc/vof: Fix missed fields in VOF cleanup Failing to reset the of_instance_last makes ihandle allocation continue to increase, which causes record-replay replay fail to match the recorded trace. Not resetting claimed_base makes VOF eventually run out of memory after some resets. Cc: Alexey Kardashevskiy Fixes: fc8c745d501 ("spapr: Implement Open Firmware client interface") Signed-off-by: Nicholas Piggin Reviewed-by: Alexey Kardashevskiy Signed-off-by: Cédric Le Goater (cherry picked from commit 7b8589d7ce7e23f26ff53338d575a5cbd7818e28) Signed-off-by: Michael Tokarev --- diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c index 18c3f92317a..e3b430a81f4 100644 --- a/hw/ppc/vof.c +++ b/hw/ppc/vof.c @@ -1024,6 +1024,8 @@ void vof_cleanup(Vof *vof) } vof->claimed = NULL; vof->of_instances = NULL; + vof->of_instance_last = 0; + vof->claimed_base = 0; } void vof_build_dt(void *fdt, Vof *vof)