From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNeUC-0002pD-Nc for qemu-devel@nongnu.org; Wed, 21 Jun 2017 08:11:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNeU7-0003ik-Vh for qemu-devel@nongnu.org; Wed, 21 Jun 2017 08:11:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40030) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dNeU7-0003iF-QT for qemu-devel@nongnu.org; Wed, 21 Jun 2017 08:11:47 -0400 From: Juan Quintela In-Reply-To: <1497640120-10729-3-git-send-email-a.perevalov@samsung.com> (Alexey Perevalov's message of "Fri, 16 Jun 2017 22:08:39 +0300") References: <1497640120-10729-1-git-send-email-a.perevalov@samsung.com> <1497640120-10729-3-git-send-email-a.perevalov@samsung.com> Reply-To: quintela@redhat.com Date: Wed, 21 Jun 2017 14:11:38 +0200 Message-ID: <87podxk0at.fsf@secure.laptop> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 2/3] migration: introduce qemu_ufd_copy_ioctl helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Perevalov Cc: qemu-devel@nongnu.org, peterx@redhat.com, i.maximets@samsung.com, dgilbert@redhat.com Alexey Perevalov wrote: > Just for placing auxilary operations inside helper, > auxilary operations like: track received pages, > notify about copying operation in futher patches. > > Reviewed-by: Dr. David Alan Gilbert > Reviewed-by: Peter Xu > Signed-off-by: Alexey Perevalov Reviewed-by: Juan Quintela > +static int qemu_ufd_copy_ioctl(int userfault_fd, void *host_addr, > + void *from_addr, uint64_t pagesize) from_addr is a void* > - if (ioctl(mis->userfault_fd, UFFDIO_ZEROPAGE, &zero_struct)) { > + if (qemu_ufd_copy_ioctl(mis->userfault_fd, host, 0, getpagesize())) { And you pass 0 here, better NULL no? If you have to respin, please change it. You can maintain the reviewed-by. > int e = errno; > error_report("%s: %s zero host: %p", > __func__, strerror(e), host);