xref: /qemu/hw/virtio/virtio-stub.c (revision 1ee7bb5b)
1 #include "qemu/osdep.h"
2 #include "qapi/error.h"
3 #include "qapi/qapi-commands-virtio.h"
4 
qmp_virtio_unsupported(Error ** errp)5 static void *qmp_virtio_unsupported(Error **errp)
6 {
7     error_setg(errp, "Virtio is disabled");
8     return NULL;
9 }
10 
qmp_x_query_virtio(Error ** errp)11 VirtioInfoList *qmp_x_query_virtio(Error **errp)
12 {
13     return qmp_virtio_unsupported(errp);
14 }
15 
qmp_x_query_virtio_status(const char * path,Error ** errp)16 VirtioStatus *qmp_x_query_virtio_status(const char *path, Error **errp)
17 {
18     return qmp_virtio_unsupported(errp);
19 }
20 
qmp_x_query_virtio_vhost_queue_status(const char * path,uint16_t queue,Error ** errp)21 VirtVhostQueueStatus *qmp_x_query_virtio_vhost_queue_status(const char *path,
22                                                             uint16_t queue,
23                                                             Error **errp)
24 {
25     return qmp_virtio_unsupported(errp);
26 }
27 
qmp_x_query_virtio_queue_status(const char * path,uint16_t queue,Error ** errp)28 VirtQueueStatus *qmp_x_query_virtio_queue_status(const char *path,
29                                                  uint16_t queue,
30                                                  Error **errp)
31 {
32     return qmp_virtio_unsupported(errp);
33 }
34 
qmp_x_query_virtio_queue_element(const char * path,uint16_t queue,bool has_index,uint16_t index,Error ** errp)35 VirtioQueueElement *qmp_x_query_virtio_queue_element(const char *path,
36                                                      uint16_t queue,
37                                                      bool has_index,
38                                                      uint16_t index,
39                                                      Error **errp)
40 {
41     return qmp_virtio_unsupported(errp);
42 }
43