diff options
author | mst@redhat.com <mst@redhat.com> | 2011-02-01 22:13:42 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-02-01 16:50:44 -0600 |
commit | 5430a28fe452907c9e1b2097e073bc1ea4b29f39 (patch) | |
tree | 066db9fdbac5a5ddca922b5d282161e9b6141b0e /hw/vhost.h | |
parent | f157ed202e51dc2492b201dc34ed28e89c973fb7 (diff) |
vhost: force vhost off for non-MSI guests
When MSI is off, each interrupt needs to be bounced through the io
thread when it's set/cleared, so vhost-net causes more context switches and
higher CPU utilization than userspace virtio which handles networking in
the same thread.
We'll need to fix this by adding level irq support in kvm irqfd,
for now disable vhost-net in these configurations.
Added a vhostforce flag to force vhost-net back on.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/vhost.h')
-rw-r--r-- | hw/vhost.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/vhost.h b/hw/vhost.h index 86dd834dbe..c8c595a147 100644 --- a/hw/vhost.h +++ b/hw/vhost.h @@ -38,10 +38,12 @@ struct vhost_dev { bool log_enabled; vhost_log_chunk_t *log; unsigned long long log_size; + bool force; }; -int vhost_dev_init(struct vhost_dev *hdev, int devfd); +int vhost_dev_init(struct vhost_dev *hdev, int devfd, 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); void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev); |