Re: [Qemu-devel] Async savevm using userfaultfd(2)

2016-10-14 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 04:27:19PM +0200, Andrea Arcangeli wrote: > I would suggest not to implement mprotect+sigsegv because maintaining > both APIs would be messy but mostly because mprotect cannot really > work for all cases and it would risk to fail at any time with > -ENOMEM. postcopy live

Re: [Qemu-devel] Async savevm using userfaultfd(2)

2016-10-13 Thread Andrea Arcangeli
Hello, On Thu, Oct 13, 2016 at 09:30:49AM +0100, Dr. David Alan Gilbert wrote: > I think it should, or at least I think all other kernel things end up being > caught by userfaultfd during postcopy. Yes indeed, it will work. vhost blocks in its own task context inside the kernel and the

Re: [Qemu-devel] Async savevm using userfaultfd(2)

2016-10-13 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@gmail.com) wrote: > On Wed, Oct 12, 2016 at 4:04 PM, Stefan Hajnoczi wrote: > > Perhaps this approach can be prototyped with mprotect and a SIGSEGV > > handler if anyone wants to get async savevm going. I don't know if > > there are any

Re: [Qemu-devel] Async savevm using userfaultfd(2)

2016-10-12 Thread Stefan Hajnoczi
On Wed, Oct 12, 2016 at 4:04 PM, Stefan Hajnoczi wrote: > Perhaps this approach can be prototyped with mprotect and a SIGSEGV > handler if anyone wants to get async savevm going. I don't know if > there are any disadvantages to mprotecting guest RAM that the kvm kernel >

Re: [Qemu-devel] Async savevm using userfaultfd(2)

2016-10-12 Thread Hailiang Zhang
On 2016/10/12 22:21, Dr. David Alan Gilbert wrote: * Stefan Hajnoczi (stefa...@gmail.com) wrote: John and I recently discussed asynchronous savevm and I wanted to post the ideas so they aren't forgotten. (We're not actively working on this feature.) Asynchronous savevm has the same effect as

Re: [Qemu-devel] Async savevm using userfaultfd(2)

2016-10-12 Thread Denis V. Lunev
On 10/12/2016 05:04 PM, Stefan Hajnoczi wrote: > John and I recently discussed asynchronous savevm and I wanted to post > the ideas so they aren't forgotten. (We're not actively working on this > feature.) > > Asynchronous savevm has the same effect as the 'savevm' monitor command: > it saves

Re: [Qemu-devel] Async savevm using userfaultfd(2)

2016-10-12 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@gmail.com) wrote: > John and I recently discussed asynchronous savevm and I wanted to post > the ideas so they aren't forgotten. (We're not actively working on this > feature.) > > Asynchronous savevm has the same effect as the 'savevm' monitor command: > it saves

Re: [Qemu-devel] Async savevm using userfaultfd(2)

2016-10-12 Thread Eric Blake
On 10/12/2016 09:04 AM, Stefan Hajnoczi wrote: > John and I recently discussed asynchronous savevm and I wanted to post > the ideas so they aren't forgotten. (We're not actively working on this > feature.) > > Asynchronous savevm has the same effect as the 'savevm' monitor command: > it saves

[Qemu-devel] Async savevm using userfaultfd(2)

2016-10-12 Thread Stefan Hajnoczi
John and I recently discussed asynchronous savevm and I wanted to post the ideas so they aren't forgotten. (We're not actively working on this feature.) Asynchronous savevm has the same effect as the 'savevm' monitor command: it saves RAM, device state, and a snapshot of all disks at the point