diff mbox series

[v2,02/19] ppc/vof: Fix missed fields in VOF cleanup

Message ID 20230808042001.411094-3-npiggin@gmail.com
State New
Headers show
Series ppc: record-replay enablement and fixes | expand

Commit Message

Nicholas Piggin Aug. 8, 2023, 4:19 a.m. UTC
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 <aik@ozlabs.ru>
Fixes: fc8c745d501 ("spapr: Implement Open Firmware client interface")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 hw/ppc/vof.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Alexey Kardashevskiy Aug. 17, 2023, 2:57 a.m. UTC | #1
On 08/08/2023 14:19, Nicholas Piggin wrote:
> 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 <aik@ozlabs.ru>
> Fixes: fc8c745d501 ("spapr: Implement Open Firmware client interface")
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>


Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>

Cool to see it still in use :)


> ---
>   hw/ppc/vof.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c
> index 18c3f92317..e3b430a81f 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)
diff mbox series

Patch

diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c
index 18c3f92317..e3b430a81f 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)