Re: [PATCH v3 1/3] qmp: remove virtio_list, search QOM tree instead

2023-08-04 Thread Jonah Palmer
On 8/3/23 12:40, Manos Pitsidianakis wrote: On Thu, 03 Aug 2023 17:54, Jonah Palmer wrote: -VirtioInfoList *qmp_x_query_virtio(Error **errp) +static int query_dev_child(Object *child, void *opaque) { -    VirtioInfoList *list = NULL; -    VirtioInfo *node; -    VirtIODevice *vdev; +   

Re: [PATCH v3 1/3] qmp: remove virtio_list, search QOM tree instead

2023-08-04 Thread Jonah Palmer
On 8/3/23 11:05, Daniel P. Berrangé wrote: 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

Re: [PATCH v3 1/3] qmp: remove virtio_list, search QOM tree instead

2023-08-03 Thread Manos Pitsidianakis
On Thu, 03 Aug 2023 17:54, Jonah Palmer wrote: -VirtioInfoList *qmp_x_query_virtio(Error **errp) +static int query_dev_child(Object *child, void *opaque) { -VirtioInfoList *list = NULL; -VirtioInfo *node; -VirtIODevice *vdev; +VirtioInfoList **vdevs = opaque; +Object *dev =

Re: [PATCH v3 1/3] qmp: remove virtio_list, search QOM tree instead

2023-08-03 Thread Daniel P . Berrangé
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

[PATCH v3 1/3] qmp: remove virtio_list, search QOM tree instead

2023-08-03 Thread Jonah Palmer
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