On 28/2/23 23:09, Michael S. Tsirkin wrote:
On Tue, Feb 28, 2023 at 11:05:24PM +0100, Philippe Mathieu-Daudé wrote:
On 28/2/23 22:41, Michael S. Tsirkin wrote:
On Fri, Feb 03, 2023 at 05:30:21PM +0100, Philippe Mathieu-Daudé wrote:
ACPI CPU hotplug parent can't be any QOM object, it must be a QDev.
Convert AcpiCpuHotplug::device field as QDev to enforce this.
Rename 'owner' and 'device' variables as 'parent'.

Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>


So instead of plain gpe->device we now have OBJECT all over
the place. Why is this an improvement?

 From QOM PoV, in this prototype change:

   void legacy_acpi_cpu_hotplug_init(MemoryRegion *container,
- Object *owner,
+ DeviceState *parent,

we promote the parent/owner argument from generic Object to
Device, which is more restrictive.

Thus now you can not pass any QOM object, it has to be a QDev.

None of the functions really seem to care what kind of object
they get. Anything that results in less casting is a win
in my book. More casting - a loss.

OK we are discussing QOM design then. I'll go back to this
in a future RFC. Sorry for having wasted your time meanwhile.

Reply via email to