History | View | Annotate | Download (25.4 kB)
vhost-net: cleanup host notifiers at last step
When the vhost notifier is disabled, the userspace handler runsimmediately: virtio_pci_set_host_notifier_internal mightcall virtio_queue_notify_vq.Since the VQ state and the tap backend state aren'trecovered yet, this causes...
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>
vhost: remove an incorrect assert
The 'to' can go negative when the first region gets removed(it gets incremented by to 0 immediately afterward), whichmakes the assertion fail. Nothing breaks ifto < 0 here so just remove the assert.
Tested-by: David Ahern <daahern@cisco.com>...
vhost: fix double free on device stop
vhost dev stop failed to clear the log field.Typically not an issue as dev start overwrites this field,but if logging gets disabled before the following start,it doesn't so this causes a double free.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
vhost: optimize out no-change assignment
Cirrus VGA (at least) calls register memory regionwith the same values again and again. Theregistration in vhost-net slows this a lot,optimize by checking that the same data is already registered.
vhost: skip memory which needs dirty logging
vhost doesn't support write logging(except for migration), anyway.
cpu: add set_memory flag to request dirty logging
Pass the flag to all cpu notifiers, doingnothing at this point. Will be used byfollow-up patches.
vhost: fix dirty page handling
vhost was passing a physical address to cpu_physical_memory_set_dirty,which is wrong: we need to translate to ram address first.
Note: this lead to crashes during migration, so the patch...
Introduce log_start/log_stop in CPUPhysMemoryClient
In order to use log_start/log_stop with Xen as well in the vga code,this two operations have been put in CPUPhysMemoryClient.
The two new functions cpu_physical_log_start,cpu_physical_log_stop areused in hw/vga.c and replace the kvm_log_start/stop. With this, vga does...
vhost: force vhost off for non-MSI guests
When MSI is off, each interrupt needs to be bounced through the iothread when it's set/cleared, so vhost-net causes more context switches andhigher CPU utilization than userspace virtio which handles networking in...
vhost: Fix address calculation in vhost_dev_sync_region()
We still need advance address even we find there's no dirty pages incurrent chunk.
Signed-off-by: Jason Wang <jasowang@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
virtio: change set guest notifier to per-device
When using irqfd with vhost-net to inject interrupts,a single evenfd might inject multiple interrupts.Implementing this is much easier with a singleper-device callback to set guest notifiers.
vhost: error code
fix up errors returned to include errno, not just -1
Introduce range.h
Extract range functions from pci.h. These will be used by later patchesby non-PCI devices. Adjust current users.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Remove unused eventfd.h
This header is not present on my system and causes a buildfailure, 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>
vhost: fix miration during device start
We need to know ring layout to allocate log buffer.So init rings first.
Also fixes a theoretical memory-leak-on-error.
https://bugzilla.redhat.com/show_bug.cgi?id=615228
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
vhost.c: include <linux/vhost.h> last
So the userspace headers define KERNEL_STRICT_NAMES and there's noconflict on type definition for older kernels.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
win32: Fix compiler errors from u_int64_t
u_int64_t raises compiler error messages:
CC libhw32/virtio.o/qemu/ar7/hw/virtio.c: In function ‘virtio_queue_get_avail_size’:/qemu/ar7/hw/virtio.c:776: error: ‘u_int64_t’ undeclared (first use in this function)...
vhost: vhost net support
This adds vhost net device support in qemu. Will be tied to tap deviceand virtio by following patches. Raw backend is currently missing,will be worked on/submitted separately.