xref: /openbmc/qemu/hw/virtio/virtio-qmp.h (revision cc37d98b)
1 /*
2  * Virtio QMP helpers
3  *
4  * Copyright IBM, Corp. 2007
5  *
6  * Authors:
7  *  Anthony Liguori   <aliguori@us.ibm.com>
8  *
9  * SPDX-License-Identifier: GPL-2.0-or-later
10  */
11 #ifndef HW_VIRTIO_QMP_H
12 #define HW_VIRTIO_QMP_H
13 
14 #include "qapi/qapi-types-virtio.h"
15 #include "hw/virtio/virtio.h"
16 #include "hw/virtio/vhost.h"
17 
18 #include "qemu/queue.h"
19 
20 typedef QTAILQ_HEAD(QmpVirtIODeviceList, VirtIODevice) QmpVirtIODeviceList;
21 
22 /* QAPI list of realized VirtIODevices */
23 extern QmpVirtIODeviceList virtio_list;
24 
25 VirtIODevice *qmp_find_virtio_device(const char *path);
26 VirtioDeviceStatus *qmp_decode_status(uint8_t bitmap);
27 VhostDeviceProtocols *qmp_decode_protocols(uint64_t bitmap);
28 VirtioDeviceFeatures *qmp_decode_features(uint16_t device_id, uint64_t bitmap);
29 
30 #endif
31