aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-qmp.h
diff options
context:
space:
mode:
authorJonah Palmer <jonah.palmer@oracle.com>2023-09-26 18:41:05 -0400
committerMichael S. Tsirkin <mst@redhat.com>2023-10-04 04:54:24 -0400
commitb532c684e0d71bc69fa56a30f1c7588101aa086a (patch)
treed374795bbddec1c12fbc23e01ccb13a427b549db /hw/virtio/virtio-qmp.h
parentb0de17a2e28de477e09e77a587fcbeafbbc897c4 (diff)
qmp: remove virtio_list, search QOM tree instead
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. Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230926224107.2951144-2-jonah.palmer@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio/virtio-qmp.h')
-rw-r--r--hw/virtio/virtio-qmp.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/hw/virtio/virtio-qmp.h b/hw/virtio/virtio-qmp.h
index 8af5f5e65a..245a446a56 100644
--- a/hw/virtio/virtio-qmp.h
+++ b/hw/virtio/virtio-qmp.h
@@ -15,13 +15,6 @@
#include "hw/virtio/virtio.h"
#include "hw/virtio/vhost.h"
-#include "qemu/queue.h"
-
-typedef QTAILQ_HEAD(QmpVirtIODeviceList, VirtIODevice) QmpVirtIODeviceList;
-
-/* QAPI list of realized VirtIODevices */
-extern QmpVirtIODeviceList virtio_list;
-
VirtIODevice *qmp_find_virtio_device(const char *path);
VirtioDeviceStatus *qmp_decode_status(uint8_t bitmap);
VhostDeviceProtocols *qmp_decode_protocols(uint64_t bitmap);