aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPankaj Gupta <pagupta@redhat.com>2015-06-16 13:48:59 +0530
committerMichael S. Tsirkin <mst@redhat.com>2015-06-19 12:17:49 +0200
commit1e7398a140f7a6bd9f5a438e7ad0f1ef50990e25 (patch)
treea321d5ab687fbe83abba5c2dfd83d97051abfff0 /include
parent74de5504fd063019433ec0746105da774ede790d (diff)
vhost: enable vhost without without MSI-X
We use vhostforce to enable vhost even if Guests don't have MSI-X support and we fall back to QEMU virtio-net. This gives a very small performance gain, but the disadvantage is that guest now controls which virtio code is running (qemu or vhost) so our attack surface is doubled. This patch will enable vhost unconditionally whenever it's requested. For compatibility, enable vhost when vhostforce is set, as well. Signed-off-by: Pankaj Gupta <pagupta@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/vhost.h3
-rw-r--r--include/net/vhost_net.h2
2 files changed, 1 insertions, 4 deletions
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h
index 84f170e789..dd510509eb 100644
--- a/include/hw/virtio/vhost.h
+++ b/include/hw/virtio/vhost.h
@@ -51,7 +51,6 @@ struct vhost_dev {
bool log_enabled;
unsigned long long log_size;
Error *migration_blocker;
- bool force;
bool memory_changed;
hwaddr mem_changed_start_addr;
hwaddr mem_changed_end_addr;
@@ -61,7 +60,7 @@ struct vhost_dev {
};
int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
- VhostBackendType backend_type, bool force);
+ VhostBackendType backend_type);
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);
diff --git a/include/net/vhost_net.h b/include/net/vhost_net.h
index 9eb493efc3..840d4b16e2 100644
--- a/include/net/vhost_net.h
+++ b/include/net/vhost_net.h
@@ -11,12 +11,10 @@ typedef struct VhostNetOptions {
VhostBackendType backend_type;
NetClientState *net_backend;
void *opaque;
- bool force;
} VhostNetOptions;
struct vhost_net *vhost_net_init(VhostNetOptions *options);
-bool vhost_net_query(VHostNetState *net, VirtIODevice *dev);
int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, int total_queues);
void vhost_net_stop(VirtIODevice *dev, NetClientState *ncs, int total_queues);