From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Jonah Palmer <jonah.palmer@oracle.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 v3 1/3] qmp: remove virtio_list, search QOM tree instead
Date: Thu, 3 Aug 2023 16:05:35 +0100 [thread overview]
Message-ID: <ZMvCPyQxQPi58mmM@redhat.com> (raw)
In-Reply-To: <20230803145500.2108691-2-jonah.palmer@oracle.com>
On Thu, Aug 03, 2023 at 10:54:58AM -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
> recursively search the QOM composition tree for devices of type
> 'TYPE_VIRTIO_DEVICE'. The device is also checked to ensure it's
> realized.
>
> [Jonah: In the previous commit the qmp_x_query_virtio function was
> iterating through devices found via. qmp_qom_list and appending
> "/virtio-backend" to devices' paths to check if they were a virtio
> device.
>
> This method was messy and involved unneeded string manipulation.
>
> Instead, we can use recursion with object_get_root to iterate through
> all parent and child device paths to find virtio devices.
>
> The qmp_find_virtio_device function was also updated to simplify the
> method of determining if a path is to a valid and realized virtio
> device.]
FWIW, this "history" would typically go after the '---' but before
the diffstat, as it is relevant to reviewers of this new v3, but
doesn't need to get into the permanent git log once merged.
> Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
> ---
> hw/virtio/virtio-qmp.c | 96 ++++++++++++++++++------------------------
> hw/virtio/virtio-qmp.h | 7 ---
> hw/virtio/virtio.c | 6 ---
> 3 files changed, 40 insertions(+), 69 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2023-08-03 15:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 14:54 [PATCH v3 0/3] qmp, vhost-user: Remove virtio_list & update virtio introspection Jonah Palmer
2023-08-03 14:54 ` [PATCH v3 1/3] qmp: remove virtio_list, search QOM tree instead Jonah Palmer
2023-08-03 15:05 ` Daniel P. Berrangé [this message]
2023-08-04 14:00 ` Jonah Palmer
2023-08-03 16:40 ` Manos Pitsidianakis
2023-08-04 14:17 ` Jonah Palmer
2023-08-03 14:54 ` [PATCH v3 2/3] qmp: update virtio feature maps, vhost-user-gpio introspection Jonah Palmer
2023-08-03 16:38 ` Manos Pitsidianakis
2023-08-03 14:55 ` [PATCH v3 3/3] vhost-user: move VhostUserProtocolFeature definition to header file Jonah Palmer
2023-08-03 16:32 ` Manos Pitsidianakis
2023-08-03 19:50 ` [PATCH v3 0/3] qmp,vhost-user: Remove virtio_list & update virtio introspection Michael S. Tsirkin
2023-08-04 14:27 ` [PATCH v3 0/3] qmp, vhost-user: " Jonah Palmer
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=ZMvCPyQxQPi58mmM@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=boris.ostrovsky@oracle.com \
--cc=eduardo@habkost.net \
--cc=jonah.palmer@oracle.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.