From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, "Daniel P. Berrangé" <berrange@redhat.com>,
qemu-rust@nongnu.org, "Eduardo Habkost" <eduardo@habkost.net>,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH 2/2] qom: Introduce class_post_init() handler
Date: Mon, 27 Jan 2025 09:06:09 +0100 [thread overview]
Message-ID: <4ab5cc49-a8c6-430b-a3d8-82a62f0f0fe4@linaro.org> (raw)
In-Reply-To: <87wmegoi6g.fsf@pond.sub.org>
On 27/1/25 08:00, Markus Armbruster wrote:
> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
>
>> Add a class_post_init() handler to be called by parents
>> *after* child class_init() handler is called. This is
>> necessary to have parent class check children properly
>> set some values or mandatory handlers.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
> Plausible, but I'd like to see actual use. What uses do you have in
> mind?
See for example:
https://lore.kernel.org/qemu-devel/20250125170125.32855-25-philmd@linaro.org/
Where the abstract parent CPUClass checks concrete target implementation
registered a handler.
(I'll cc you on another use shortly).
next prev parent reply other threads:[~2025-01-27 8:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-25 16:58 [PATCH 0/2] qom: Introduce class_post_init() handler Philippe Mathieu-Daudé
2025-01-25 16:58 ` [PATCH 1/2] qom: Declare class_base_init() before class_init() Philippe Mathieu-Daudé
2025-01-25 16:58 ` [PATCH 2/2] qom: Introduce class_post_init() handler Philippe Mathieu-Daudé
2025-01-27 7:00 ` Markus Armbruster
2025-01-27 8:06 ` Philippe Mathieu-Daudé [this message]
2025-01-27 8:26 ` [PATCH 0/2] " Paolo Bonzini
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=4ab5cc49-a8c6-430b-a3d8-82a62f0f0fe4@linaro.org \
--to=philmd@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eduardo@habkost.net \
--cc=manos.pitsidianakis@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@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).