Re: [PATCH 0/5] Trivial cleanup

Peter Maydell <[email protected]> Thu, 30 Apr 2026 11:42:40 +0100
Newsgroups org.nongnu.qemu-trivial,org.nongnu.qemu-arm,org.nongnu.qemu-devel
Message-ID <CAFEAcA8DbrVdRQK4Cy8gqU__FXYsTa0nZERqrd4he0Y1WRW7uA@mail.gmail.com>
On Sun, 8 Mar 2026 at 20:35, Bernhard Beschow <[email protected]> wrote:
>
> This series contains some low-hanging fruit fixes I came up with when
> investigating Rust for QEMU, especially QOM object lifecycle vs. the Drop trait.
>
> I noticed that no finalize methods were called in Rust sysbus devices when QEMU
> quits, and neither are its C variants. What is probably missing in the first
> place is a
>
>   object_unref(object_get_root());
>
> at the end of qemu_cleanup() in runstate.c (see TODO there). Adding it before
> this series won't clean up machines since their refcount won't reach zero. With
> this series applied this additional line will cause various issues when quitting
> QEMU, allowing the problem to be investigated. Fixing it is beyond the scope of
> this series (and my time budget).
>
> Testing done:
> * `make check`
> * Run imx8mp-evk with a Buildroot image
>
> Bernhard Beschow (5):
>   hw/arm/fsl-imx8mp: Do not create redundant unimplemented devices
>   hw/arm/fsl-imx8mp: Fix parent of ocram memory region
>   hw/arm/imx8mp-evk: Fix reference count of SoC object
>   system/vl: Fix reference count of machine object
>   Revert "sysbus: add irq_routing_notifier"

Hi; I've applied patches 1, 2, 3 and 5 to target-arm.next, since
they're all either arm-specific or the obviously-OK patch that
deletes the unused connect_irq_notifier method.

Patch 4 (the system/vl one) I am not applying, because it hasn't been
reviewed and I don't know enough to know if it's correct or not.
(My guess is that it is correct.) You might want to repost
it as a standalone patch to try to get it a bit more attention.

thanks
-- PMM