aboutsummaryrefslogtreecommitdiff
path: root/include/hw/virtio/vhost.h
diff options
context:
space:
mode:
authorNikolay Nikolaev <n.nikolaev@virtualopensystems.com>2014-05-27 15:05:49 +0300
committerMichael S. Tsirkin <mst@redhat.com>2014-06-19 16:41:56 +0300
commit1a1bfac9ee13d76a4b257431cc4193c8a42efa19 (patch)
tree47c0d93e3931a6992f5835c5d292533e931789bf /include/hw/virtio/vhost.h
parent24d1eb33eb2ccd995a845a4d4b793e2619a9e460 (diff)
Add vhost-backend and VhostBackendType
Use vhost_set_backend_type to initialise a proper vhost_ops structure. In vhost_net_init and vhost_net_start_one call conditionally TAP related initialisation depending on the vhost backend type. Signed-off-by: Antonios Motakis <a.motakis@virtualopensystems.com> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/virtio/vhost.h')
-rw-r--r--include/hw/virtio/vhost.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h
index 4714277f82..33028ec8c2 100644
--- a/include/hw/virtio/vhost.h
+++ b/include/hw/virtio/vhost.h
@@ -31,7 +31,6 @@ typedef unsigned long vhost_log_chunk_t;
struct vhost_memory;
struct vhost_dev {
MemoryListener memory_listener;
- int control;
struct vhost_memory *mem;
int n_mem_sections;
MemoryRegionSection *mem_sections;
@@ -51,10 +50,11 @@ struct vhost_dev {
hwaddr mem_changed_start_addr;
hwaddr mem_changed_end_addr;
const VhostOps *vhost_ops;
+ void *opaque;
};
int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
- bool force);
+ VhostBackendType backend_type, bool force);
void vhost_dev_cleanup(struct vhost_dev *hdev);
bool vhost_dev_query(struct vhost_dev *hdev, VirtIODevice *vdev);
int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev);