diff options
author | Pankaj Gupta | 2015-06-16 10:18:59 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2015-06-19 12:17:49 +0200 |
commit | 1e7398a140f7a6bd9f5a438e7ad0f1ef50990e25 (patch) | |
tree | a321d5ab687fbe83abba5c2dfd83d97051abfff0 /hw/net/vhost_net.c | |
parent | pci: Don't register a specialized 'config_write' if default behavior is intended (diff) | |
download | qemu-1e7398a140f7a6bd9f5a438e7ad0f1ef50990e25.tar.gz qemu-1e7398a140f7a6bd9f5a438e7ad0f1ef50990e25.tar.xz qemu-1e7398a140f7a6bd9f5a438e7ad0f1ef50990e25.zip |
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 'hw/net/vhost_net.c')
-rw-r--r-- | hw/net/vhost_net.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index f505c91d42..9bd360bd17 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -163,7 +163,7 @@ struct vhost_net *vhost_net_init(VhostNetOptions *options) net->dev.vq_index = net->nc->queue_index; r = vhost_dev_init(&net->dev, options->opaque, - options->backend_type, options->force); + options->backend_type); if (r < 0) { goto fail; } @@ -188,11 +188,6 @@ fail: return NULL; } -bool vhost_net_query(VHostNetState *net, VirtIODevice *dev) -{ - return vhost_dev_query(&net->dev, dev); -} - static void vhost_net_set_vq_index(struct vhost_net *net, int vq_index) { net->dev.vq_index = vq_index; @@ -424,11 +419,6 @@ struct vhost_net *vhost_net_init(VhostNetOptions *options) return NULL; } -bool vhost_net_query(VHostNetState *net, VirtIODevice *dev) -{ - return false; -} - int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, int total_queues) |