From: Jonah Palmer <jonah.palmer@oracle.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, philmd@linaro.org, laurent@vivier.eu,
mst@redhat.com, boris.ostrovsky@oracle.com,
alex.bennee@linaro.org, viresh.kumar@linaro.org,
armbru@redhat.com, pbonzini@redhat.com, eduardo@habkost.net
Subject: Re: [PATCH v1 1/2] qmp: remove virtio_list, search QOM tree instead
Date: Mon, 5 Jun 2023 10:31:47 -0400 [thread overview]
Message-ID: <98505298-7e84-53ae-7c6c-bd488f9d0e37@oracle.com> (raw)
In-Reply-To: <ZGSMciocECtO0StI@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]
On 5/17/23 04:12, Daniel P. Berrangé wrote:
> On Tue, May 16, 2023 at 03:26:25PM -0400, Jonah Palmer wrote:
>> The virtio_list duplicates information about virtio devices that already
>> exist in the QOM composition tree. Instead of creating this list of
>> realized virtio devices, search the QOM composition tree instead.
>>
>> This patch modifies the QMP command qmp_x_query_virtio to instead search
>> the partial paths of '/machine/peripheral/' &
>> '/machine/peripheral-anon/' in the QOM composition tree for virtio
>> devices.
>>
>> A device is found to be a valid virtio device if (1) it has a canonical
>> path ending with 'virtio-backend' and (2) the device has been realized.
> Checking the path suffix feels pretty undesirable to me when we could
> be doing a QOM class check
>
> if (object_dynamic_cast(obj, TYPE_VIRTIO_DEVICE))
> ...
>
>
> With regards,
> Daniel
Ah, yes, you're right. This is a much better solution. I will do this instead
of the hacky string manipulation (which also felt undesirable to me).
Jonah
[-- Attachment #2: Type: text/html, Size: 1625 bytes --]
prev parent reply other threads:[~2023-06-05 14:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 19:26 [PATCH v1 1/2] qmp: remove virtio_list, search QOM tree instead Jonah Palmer
2023-05-16 19:26 ` [PATCH v1 2/2] qmp: update virtio feature maps, vhost-user-gpio instrospection Jonah Palmer
2023-05-17 8:12 ` [PATCH v1 1/2] qmp: remove virtio_list, search QOM tree instead Daniel P. Berrangé
2023-06-05 14:31 ` Jonah Palmer [this message]
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=98505298-7e84-53ae-7c6c-bd488f9d0e37@oracle.com \
--to=jonah.palmer@oracle.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=boris.ostrovsky@oracle.com \
--cc=eduardo@habkost.net \
--cc=laurent@vivier.eu \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=viresh.kumar@linaro.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).