Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-18 Thread Paolo Bonzini
Do you know the size of the ram_addr_t space from VHOST_USER_SET_MEM_TABLE's user address and size fields? For some reason, vhost_get_log_size() also takes pc-bios region. I think it's quite unnecessary given that the backend will not have access to this region. That's by design. The

Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-17 Thread Paolo Bonzini
On 17/07/2015 15:35, Marc-André Lureau wrote: LOG_FD is implemented in the kernel drivers/vhost/vhost.c. It seems to be an eventfd-like mechanism to save on dirty bitmap scans. However, it's not well documented how to implement it in a correct way. and it's not used by qemu, so hard to

Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-17 Thread Paolo Bonzini
On 17/07/2015 12:34, Marc-André Lureau wrote: On Fri, Jul 17, 2015 at 4:25 AM, Paolo Bonzini pbonz...@redhat.com wrote: But LOG_BASE makes little sense across processes, and LOG_FD is unused in QEMU, isn't it? So this patch is not enough to add support of live migration. You are right,

Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-17 Thread Marc-André Lureau
Hi On Fri, Jul 17, 2015 at 2:57 PM, Paolo Bonzini pbonz...@redhat.com wrote: LOG_FD is implemented in the kernel drivers/vhost/vhost.c. It seems to be an eventfd-like mechanism to save on dirty bitmap scans. However, it's not well documented how to implement it in a correct way. and it's

Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-17 Thread Marc-André Lureau
Hi On Fri, Jul 17, 2015 at 4:25 AM, Paolo Bonzini pbonz...@redhat.com wrote: But LOG_BASE makes little sense across processes, and LOG_FD is unused in QEMU, isn't it? So this patch is not enough to add support of live migration. You are right, LOG_BASE doesn't make much sense, and LOG_FD

Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-17 Thread Marc-André Lureau
Hi On Fri, Jul 17, 2015 at 3:50 PM, Paolo Bonzini pbonz...@redhat.com wrote: The offset should be 0... Yeah, except if we want to prepend other kind of data in the same allocation, or we want to split somehow usage of this region. I think it's more future-proof to have it if we introduce a new

Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-16 Thread Paolo Bonzini
On 17/07/2015 02:19, Marc-André Lureau wrote: How does vhost-user do this? I can see this patch providing enough support for *non*live migration. However, it cannot be enough for live migration unless I'm missing something obvious. Paolo Agree. vhost-user should mmap the log

Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-16 Thread Marc-André Lureau
Hi On Mon, Jul 13, 2015 at 4:27 AM, Linhaifeng haifeng@huawei.com wrote: When a packet is received by vhost-user, the vhost-user writes the packet in guest memory. QEMU must then copy that page of guest memory from source to destination; it uses a dirty bitmap for this purpose. How does

Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-12 Thread Linhaifeng
On 2015/7/10 21:05, Paolo Bonzini wrote: On 26/06/2015 11:22, Thibaut Collet wrote: Some vhost client/backend are able to support live migration. To provide this service the following features must be added: 1. Add the VIRTIO_NET_F_GUEST_ANNOUNCE capability to vhost-net when netdev

Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-10 Thread Paolo Bonzini
On 26/06/2015 11:22, Thibaut Collet wrote: Some vhost client/backend are able to support live migration. To provide this service the following features must be added: 1. Add the VIRTIO_NET_F_GUEST_ANNOUNCE capability to vhost-net when netdev backend is vhost-user. 2. Provide a nop

[Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-06-26 Thread Thibaut Collet
Some vhost client/backend are able to support live migration. To provide this service the following features must be added: 1. Add the VIRTIO_NET_F_GUEST_ANNOUNCE capability to vhost-net when netdev backend is vhost-user. 2. Provide a nop receive callback to vhost-user. This callback is for