mirror of
https://github.com/qemu/qemu.git
synced 2024-12-14 06:53:43 +08:00
b532c684e0
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>
24 lines
573 B
C
24 lines
573 B
C
/*
|
|
* Virtio QMP helpers
|
|
*
|
|
* Copyright IBM, Corp. 2007
|
|
*
|
|
* Authors:
|
|
* Anthony Liguori <aliguori@us.ibm.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
#ifndef HW_VIRTIO_QMP_H
|
|
#define HW_VIRTIO_QMP_H
|
|
|
|
#include "qapi/qapi-types-virtio.h"
|
|
#include "hw/virtio/virtio.h"
|
|
#include "hw/virtio/vhost.h"
|
|
|
|
VirtIODevice *qmp_find_virtio_device(const char *path);
|
|
VirtioDeviceStatus *qmp_decode_status(uint8_t bitmap);
|
|
VhostDeviceProtocols *qmp_decode_protocols(uint64_t bitmap);
|
|
VirtioDeviceFeatures *qmp_decode_features(uint16_t device_id, uint64_t bitmap);
|
|
|
|
#endif
|