From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org, Ani Sinha <ani@anisinha.ca>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
Markus Armbruster <armbru@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [PATCH 3/3] hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent'
Date: Tue, 28 Feb 2023 23:13:06 +0100 [thread overview]
Message-ID: <7212f541-ded3-dbb3-fb0c-7ed3832546c3@linaro.org> (raw)
In-Reply-To: <20230228170637-mutt-send-email-mst@kernel.org>
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é <philmd@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.
next prev parent reply other threads:[~2023-02-28 22:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 16:30 [PATCH 0/3] hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent' Philippe Mathieu-Daudé
2023-02-03 16:30 ` [PATCH 1/3] hw/acpi/cpu_hotplug: Rename gpe_cpu -> gpe Philippe Mathieu-Daudé
2023-02-28 21:48 ` Michael S. Tsirkin
2023-02-28 22:26 ` Philippe Mathieu-Daudé
2023-02-03 16:30 ` [PATCH 2/3] hw/acpi/cpu_hotplug: Rename 'parent' MemoryRegion as 'container' Philippe Mathieu-Daudé
2023-02-28 21:43 ` Michael S. Tsirkin
2023-02-28 22:16 ` Philippe Mathieu-Daudé
2023-02-28 22:21 ` Michael S. Tsirkin
2023-02-03 16:30 ` [PATCH 3/3] hw/acpi/cpu_hotplug: Convert 'Object *device' -> 'DeviceState *parent' Philippe Mathieu-Daudé
2023-02-28 15:40 ` Igor Mammedov
2023-02-28 21:41 ` Michael S. Tsirkin
2023-02-28 22:05 ` Philippe Mathieu-Daudé
2023-02-28 22:09 ` Michael S. Tsirkin
2023-02-28 22:13 ` Philippe Mathieu-Daudé [this message]
2023-02-22 21:34 ` [PATCH 0/3] " Philippe Mathieu-Daudé
2023-02-28 13:36 ` Philippe Mathieu-Daudé
2023-02-28 15:47 ` Igor Mammedov
2023-02-28 21:50 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7212f541-ded3-dbb3-fb0c-7ed3832546c3@linaro.org \
--to=philmd@linaro.org \
--cc=ani@anisinha.ca \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=imammedo@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).