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 say if it actually work well. > > > In any case, live migration needs a new message type (like LOG_MMAP_FD) > > in the vhost-user protocol. > > Yes, perhaps with size and offset. I am looking at this.
The offset should be 0... Do you know the size of the ram_addr_t space from VHOST_USER_SET_MEM_TABLE's user address and size fields? If the size isn't needed, you can reuse LOG_BASE, ignoring the content of the payload and adding the SCM_RIGHTS file descriptor. Paolo