On Sat, 10 Apr 2021 at 16:15, Peter Maydell <peter.mayd...@linaro.org> wrote: > I do wonder if the right fix to that would be to make TYPE_MACHINE > be a subtype of TYPE_DEVICE, though -- machines not being subtypes > of device has other annoying effects, like their not having reset > methods or being able to register vmstate structs.
I wasn't quite right about this -- turns out that machines can have a reset method, but it is a weird special case method MachineClass::reset that isn't like device reset. (We use it in a few machine types; if implemented, it is responsible for calling qemu_devices_reset() to kick off device reset. Probably MachineClass ought to implement TYPE_RESETTABLE_INTERFACE instead.) thanks -- PMM