qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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 v1 1/2] qmp: remove virtio_list, search QOM tree instead
Date: Wed, 17 May 2023 09:12:34 +0100	[thread overview]
Message-ID: <ZGSMciocECtO0StI@redhat.com> (raw)
In-Reply-To: <20230516192626.3521630-1-jonah.palmer@oracle.com>

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
-- 
|: 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 :|



  parent reply	other threads:[~2023-05-17  8:13 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 ` Daniel P. Berrangé [this message]
2023-06-05 14:31   ` [PATCH v1 1/2] qmp: remove virtio_list, search QOM tree instead 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=ZGSMciocECtO0StI@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 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).