Commit Graph

13 Commits

Author SHA1 Message Date
Paolo Bonzini 6b620ca3b0 prepare for future GPLv2+ relicensing
All files under GPLv2 will get GPLv2+ changes starting tomorrow.
event_notifier.c and exec-obsolete.h were only ever touched by Red Hat
employees and can be relicensed now.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-13 10:55:56 -06:00
Michael S. Tsirkin b0b3db7955 vhost-net: cleanup host notifiers at last step
When the vhost notifier is disabled, the userspace handler runs
immediately: virtio_pci_set_host_notifier_internal might
call virtio_queue_notify_vq.
Since the VQ state and the tap backend state aren't
recovered yet, this causes
"Guest moved used index from XXX to YYY" assertions.

The solution is to split out host notifier handling
from vhost VQ setup and disable notifiers as our last step
when we stop vhost-net. For symmetry enable them first thing
on start.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-08-26 11:25:25 +03:00
Anthony Liguori 7267c0947d Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-20 23:01:08 -05:00
Michael Tokarev 35f7546206 print meaningful error message in case of --disable-vhost-net
When qemu gets compiled without support of vhost-net, any attempt
to use it fails with a very clear error message:

 qemu-system-x86_64: -netdev ...,vhost=on: vhost-net requested but could not be initialized

there's absolutely no reason given _why_ it coult not be
initialized, and even strace'ing the process in question
does not reveal any errors.  So print a message telling
what's going on.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-06-14 16:48:04 +03:00
Michael S. Tsirkin bcbabae8ff virtio: event index support
Add support for event_idx feature, and utilize it to
reduce the number of interrupts and exits for the guest.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-06-12 16:36:53 +03:00
mst@redhat.com 5430a28fe4 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>
2011-02-01 16:50:44 -06:00
Michael S. Tsirkin 6b37c87c96 vhost: fix infinite loop on error path
file.index is unsigned, hence 'while (--file.index >= 0)'
will loop > forever. Change to while (file.index-- > 0).

Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-09-14 16:02:23 +02:00
Michael S. Tsirkin ca736c8e74 vhost_net: mergeable buffers support
use the new tap APIs to set header length

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-09-07 20:27:42 +03:00
Mike McCormack 708f2ada7d Remove unused eventfd.h
This header is not present on my system and causes a build
failure, but is also not used in these files, so remove it.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-30 23:25:25 +02:00
Jes Sorensen 29f91781bd vhost_net.c: v2 Fix build failure introduced by 0bfcd599e3
Fix build failure introduced by 0bfcd599e3

The format statement expects unsigned long on x86_64, but receives
unsigned long long, so gcc exits with an error.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-27 18:57:31 +00:00
Blue Swirl 0bfcd599e3 Fix %lld or %llx printf format use
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 08:02:12 +00:00
Michael S. Tsirkin 5751995a20 vhost-net: disable mergeable buffers
vhost in current kernels doesn't support mergeable buffers.
Disable this feature if vhost is enabled, until such
support is implemented.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-13 23:59:49 +02:00
Michael S. Tsirkin d59700553e vhost: vhost net support
This adds vhost net device support in qemu. Will be tied to tap device
and virtio by following patches.  Raw backend is currently missing,
will be worked on/submitted separately.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-01 13:56:43 -05:00