On 13/8/26 17:48, Bin Meng wrote:
Most ARM board files declare their struct arm_boot_info as a static object at file scope (or, occasionally, as a function-local static inside the machine init function). arm_load_kernel() stashes a pointer to that struct in every CPU and dereferences it from do_cpu_reset() on each reset, so the boot info conceptually belongs to the machine for the lifetime of the VM, not to a static object whose ownership is left implicit. This is a longstanding leftover pattern: modern machines such as virt, raspi and xlnx-zcu102 already keep the boot info in their MachineState subclass. This series converts the remaining machines that still use a static object, moving the struct into their machine state so that its lifetime and ownership match how arm_load_kernel() actually uses it.
I wanted that cleanup since a long time, excellent, thanks Bin!
