aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKONRAD Frederic <fred.konrad@greensocs.com>2013-04-30 16:08:48 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-05-03 12:05:15 -0500
commit1034e9cf4d0740c4c845d79998ac53a5b23e534d (patch)
tree2c8835e4f0f6fc82e6eaa981ca57f70559a7e1d0 /include
parentf4dd69aa4ce96196b3d84cd3d3e14a79ea029630 (diff)
virtio: add virtio_device_set_child_bus_name.
Add virtio_device_set_child_bus_name function. It will be used with virtio-serial-x and virtio-scsi-x to set the child bus name before calling virtio-x-device's init. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1367330931-12994-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index ae7a4c43d3..a6c5c5380c 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -118,6 +118,7 @@ struct VirtIODevice
uint16_t device_id;
bool vm_running;
VMChangeStateEntry *vmstate;
+ char *bus_name;
};
typedef struct VirtioDeviceClass {
@@ -149,6 +150,9 @@ void virtio_init(VirtIODevice *vdev, const char *name,
uint16_t device_id, size_t config_size);
void virtio_cleanup(VirtIODevice *vdev);
+/* Set the child bus name. */
+void virtio_device_set_child_bus_name(VirtIODevice *vdev, char *bus_name);
+
VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size,
void (*handle_output)(VirtIODevice *,
VirtQueue *));