aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-qmp.h
blob: 59681082e58b1a9c2a210c885770c99a9f77840d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * 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 "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);
VirtioDeviceFeatures *qmp_decode_features(uint16_t device_id, uint64_t bitmap);

#endif