On 24/02/2017 19:28, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> > > As an extra sanity check, make sure the region we're registering > can perform UFFDIO_COPY; the COPY will fail later but this > gives a cleaner failure. > > Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > --- > migration/postcopy-ram.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c > index 102fb61..effbeb6 100644 > --- a/migration/postcopy-ram.c > +++ b/migration/postcopy-ram.c > @@ -378,6 +378,10 @@ static int ram_block_enable_notify(const char > *block_name, void *host_addr, > error_report("%s userfault register: %s", __func__, strerror(errno)); > return -1; > } > + if (!(reg_struct.ioctls & ((__u64)1 << _UFFDIO_COPY))) { > + error_report("%s userfault: Region doesn't support COPY", __func__); > + return -1; > + } > > return 0; > } > Reviewed-by: Laurent Vivier <lviv...@redhat.com>
- [Qemu-devel] [PATCH v3 03/16] postcopy: Chunk... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 04/16] exec: ram_block... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 05/16] postcopy: enhan... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 06/16] postcopy: Recor... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 11/16] postcopy: Send ... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 09/16] postcopy: Load ... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 14/16] postcopy: Check... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 10/16] postcopy: Mask ... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 12/16] postcopy: Allow... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 16/16] postcopy: Add e... Dr. David Alan Gilbert (git)
- Re: [Qemu-devel] [PATCH v3 16/16] postco... Laurent Vivier
- [Qemu-devel] [PATCH v3 13/16] postcopy: Updat... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 15/16] postcopy: Add d... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 02/16] postcopy: Trans... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 01/16] postcopy: Trans... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 08/16] postcopy: Use t... Dr. David Alan Gilbert (git)
- [Qemu-devel] [PATCH v3 07/16] postcopy: Plumb... Dr. David Alan Gilbert (git)