Statistics
| Branch: | Revision:

root / hw / vhost.c @ 4e4fa398

History | View | Annotate | Download (28.4 kB)

# Date Author Comment
fd4aa979 01/25/2012 08:32 pm Blue Swirl

memory: change dirty setting APIs to take a size

Instead of each target knowing or guessing the guest page size,
just pass the desired size of dirtied memory area.

Signed-off-by: Blue Swirl <>

6b620ca3 01/13/2012 06:55 pm Paolo Bonzini

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 <>...

c49450b9 01/09/2012 02:01 pm Avi Kivity

vhost: improve region filtering

vhost memory management doesn't care about non-memory (e.g. PIO) or non-RAM
regions. Adjust the filtering to reflect that, and move it earlier so it
applies to mem_sections too.

Signed-off-by: Avi Kivity <>...

637f7a6a 01/09/2012 01:59 pm Avi Kivity

vhost: fix mem_sections memory corruption

A memset() used to delete an entry in an array did not take into account
the array element's size.

Signed-off-by: Avi Kivity <>
Acked-by: Michael S. Tsirkin <>

d743c382 01/09/2012 01:09 pm Avi Kivity

vhost: fix incorrect userspace address

MemoryListener::region_add() gives us a slice of a MemoryRegion, not a
region. Adjust the userspace address to reflect that.

Signed-off-by: Avi Kivity <>
Acked-by: Michael S. Tsirkin <>

2817b260 01/03/2012 07:19 pm Avi Kivity

vhost: avoid cpu_get_physical_page_desc()

This reaches into the innards of the memory core, which are being
changed. Switch to a memory API version.

Signed-off-by: Avi Kivity <>

04097f7c 12/20/2011 02:14 pm Avi Kivity

vhost: convert to MemoryListener API

Drop the use of cpu_register_phys_memory_client() in favour of the new
MemoryListener API. The new API simplifies the caller, since there is no
need to deal with splitting and merging slots; however this is not exploited...

b0b3db79 08/26/2011 11:25 am Michael S. Tsirkin

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...

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

cb4b4fde 08/03/2011 06:00 pm Michael S. Tsirkin

vhost: remove an incorrect assert

The 'to' can go negative when the first region gets removed
(it gets incremented by to 0 immediately afterward), which
makes the assertion fail. Nothing breaks if
to < 0 here so just remove the assert.

Tested-by: David Ahern <>...

c1be973a 07/17/2011 06:47 pm Michael S. Tsirkin

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 <>

4e789564 04/07/2011 01:30 pm Michael S. Tsirkin

vhost: optimize out no-change assignment

Cirrus VGA (at least) calls register memory region
with the same values again and again. The
registration in vhost-net slows this a lot,
optimize by checking that the same data is already registered.

Signed-off-by: Michael S. Tsirkin <>

f5a4e64f 04/06/2011 11:12 pm Michael S. Tsirkin

vhost: skip memory which needs dirty logging

vhost doesn't support write logging
(except for migration), anyway.

Signed-off-by: Michael S. Tsirkin <>

0fd542fb 04/06/2011 10:28 pm Michael S. Tsirkin

cpu: add set_memory flag to request dirty logging

Pass the flag to all cpu notifiers, doing
nothing at this point. Will be used by
follow-up patches.

Signed-off-by: Michael S. Tsirkin <>

7b67b18a 03/28/2011 07:34 pm Michael S. Tsirkin

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.

Signed-off-by: Michael S. Tsirkin <>

Note: this lead to crashes during migration, so the patch...

e5896b12 02/14/2011 04:39 pm Anthony PERARD

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 are
used in hw/vga.c and replace the kvm_log_start/stop. With this, vga does...

5430a28f 02/02/2011 12:50 am mst@redhat.com

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...

0c600ce2 12/02/2010 09:13 pm Jason Wang

vhost: Fix address calculation in vhost_dev_sync_region()

We still need advance address even we find there's no dirty pages in
current chunk.

Signed-off-by: Jason Wang <>
Signed-off-by: Michael S. Tsirkin <>

54dd9321 10/07/2010 01:19 pm Michael S. Tsirkin

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 single
per-device callback to set guest notifiers.

Signed-off-by: Michael S. Tsirkin <>

c8852121 10/07/2010 01:19 pm Michael S. Tsirkin

vhost: error code

fix up errors returned to include errno, not just -1

Signed-off-by: Michael S. Tsirkin <>

bf1b0071 09/18/2010 08:53 am Blue Swirl

Introduce range.h

Extract range functions from pci.h. These will be used by later patches
by non-PCI devices. Adjust current users.

Signed-off-by: Blue Swirl <>

708f2ada 07/31/2010 12:25 am Mike McCormack

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 <>
Signed-off-by: Aurelien Jarno <>

d154e0ba 07/19/2010 02:20 pm Michael S. Tsirkin

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 <>...

11078ae3 04/14/2010 01:12 am Marcelo Tosatti

vhost.c: include <linux/vhost.h> last

So the userspace headers define KERNEL_STRICT_NAMES and there's no
conflict on type definition for older kernels.

Signed-off-by: Marcelo Tosatti <>
Acked-by: Michael S. Tsirkin <>
Signed-off-by: Aurelien Jarno <>

2b3af999 04/02/2010 01:01 am Stefan Weil

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)...
d5970055 04/01/2010 09:56 pm Michael S. Tsirkin

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 <>...