From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpstG-0005iN-0V for qemu-devel@nongnu.org; Fri, 30 Sep 2016 04:09:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpstB-00086e-Ob for qemu-devel@nongnu.org; Fri, 30 Sep 2016 04:09:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpstB-00086R-Hy for qemu-devel@nongnu.org; Fri, 30 Sep 2016 04:09:49 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2BD08C05A28A for ; Fri, 30 Sep 2016 08:09:49 +0000 (UTC) Date: Fri, 30 Sep 2016 09:09:44 +0100 From: "Daniel P. Berrange" Message-ID: <20160930080944.GB17928@redhat.com> Reply-To: "Daniel P. Berrange" References: <1475176178-4873-1-git-send-email-dgilbert@redhat.com> <1475176178-4873-3-git-send-email-dgilbert@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1475176178-4873-3-git-send-email-dgilbert@redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/2] migration/postcopy: Explicitly disallow huge pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, quintela@redhat.com, amit.shah@redhat.com On Thu, Sep 29, 2016 at 08:09:38PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > At the moment postcopy will fail as soon as qemu tries to register > userfault on the RAMBlock pages that are backed by hugepages. > However, the kernel is going to get userfault support for hugepage > at some point, and we've not got the rest of the QEMU code to support > it yet, so fail neatly with an error like: > > Postcopy doesn't support hugetlbfs yet (/objects/mem1) > > Signed-off-by: Dr. David Alan Gilbert > --- > migration/postcopy-ram.c | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c > index 9b04778..9723593 100644 > --- a/migration/postcopy-ram.c > +++ b/migration/postcopy-ram.c > @@ -85,6 +85,23 @@ static bool ufd_version_check(int ufd) > } > > /* > + * Check for things that postcopy won't support; returns 0 if the block > + * is fine. > + */ > +static int check_range(const char *block_name, void *host_addr, > + ram_addr_t offset, ram_addr_t length, void *opaque) > +{ > + RAMBlock *rb = qemu_ram_block_by_name(block_name); > + > + if (qemu_ram_pagesize(rb) > getpagesize()) { > + error_report("Postcopy doesn't support hugetlbfs yet (%s)", block_name); A small nitpick - I'd suggest s/hugetlbfs/large page sizes/ as this error will ultimately bubble up to users, and 'large page sizes' is the conceptual feature Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|