On Mon, 24 Aug 2026 at 15:15, Peter Maydell <[email protected]> wrote:
>
> On Mon, 24 Aug 2026 at 14:55, Philippe Mathieu-Daudé
> <[email protected]> wrote:
> >
> > Hi Peter,
> >
> > On 24/8/26 12:28, Peter Maydell wrote:
> > > The GICv5 allocates memory and creates hashtables during realize and
> > > as part of its operation.  Free those resources in finalize.
> >
> > Why not in unrealize() path?
>
> No particular strong reason. Do we have some life-cycle/style
> guidance on when we should put things in unrealize vs finalize ?

Looking at this again, I noticed that to put these in an unrealize
we would need to register an unrealize method we don't have now,
using device_class_set_parent_unrealize() for the child classes,
and have the child classes chain up to the parent unrealize.
On the other hand, we have (empty) finalize methods in these
classes already and you get the chaining up to parent classes for free.

So unless we have a reason or concrete style guidance saying why we
ought to prefer to do cleanup in unrealize rather than finalize,
I'm going to leave this as is for v2 of this series.

thanks
-- PMM

Reply via email to