From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtK1J-0000c7-Q3 for qemu-devel@nongnu.org; Tue, 25 Nov 2014 12:35:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtK1C-0003e1-1f for qemu-devel@nongnu.org; Tue, 25 Nov 2014 12:35:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtK1B-0003dk-Pt for qemu-devel@nongnu.org; Tue, 25 Nov 2014 12:35:13 -0500 Date: Tue, 25 Nov 2014 17:34:52 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20141125173451.GA11112@work-vm> References: <1412358473-31398-1-git-send-email-dgilbert@redhat.com> <1412358473-31398-26-git-send-email-dgilbert@redhat.com> <20141104014032.GF27321@voom.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141104014032.GF27321@voom.fritz.box> Subject: Re: [Qemu-devel] [PATCH v4 25/47] postcopy: OS support test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, quintela@redhat.com, cristian.klein@cs.umu.se, qemu-devel@nongnu.org, amit.shah@redhat.com, yanghy@cn.fujitsu.com * David Gibson (david@gibson.dropbear.id.au) wrote: > On Fri, Oct 03, 2014 at 06:47:31PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Provide a check to see if the OS we're running on has all the bits > > needed for postcopy. > > > > Creates postcopy-ram.c which will get most of the other helpers we need. > > > > Signed-off-by: Dr. David Alan Gilbert > > --- > > Makefile.objs | 2 +- > > include/migration/postcopy-ram.h | 19 +++++ > > postcopy-ram.c | 160 +++++++++++++++++++++++++++++++++++++++ > > savevm.c | 6 ++ > > 4 files changed, 186 insertions(+), 1 deletion(-) > > create mode 100644 include/migration/postcopy-ram.h > > create mode 100644 postcopy-ram.c > > > > diff --git a/Makefile.objs b/Makefile.objs > > index 97db978..fa0a3a0 100644 > > --- a/Makefile.objs > > +++ b/Makefile.objs > > @@ -54,7 +54,7 @@ common-obj-y += qemu-file.o > > common-obj-$(CONFIG_RDMA) += migration-rdma.o > > common-obj-y += qemu-char.o #aio.o > > common-obj-y += block-migration.o > > -common-obj-y += page_cache.o xbzrle.o > > +common-obj-y += page_cache.o xbzrle.o postcopy-ram.o > > > > common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o > > > > diff --git a/include/migration/postcopy-ram.h b/include/migration/postcopy-ram.h > > new file mode 100644 > > index 0000000..dcd1afa > > --- /dev/null > > +++ b/include/migration/postcopy-ram.h > > @@ -0,0 +1,19 @@ > > +/* > > + * Postcopy migration for RAM > > + * > > + * Copyright 2013 Red Hat, Inc. and/or its affiliates > > + * > > + * Authors: > > + * Dave Gilbert > > + * > > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > > + * See the COPYING file in the top-level directory. > > + * > > + */ > > +#ifndef QEMU_POSTCOPY_RAM_H > > +#define QEMU_POSTCOPY_RAM_H > > + > > +/* Return 0 if the host supports everything we need to do postcopy-ram */ > > +int postcopy_ram_hosttest(void); > > Maybe postcopy_supported_by_host() would be a bit clearer? I went with postcopy_ram_supported_by_host (and flipped the sense so it returns true if it's supported) > [snip] > > +#ifdef HOST_X86_64 > > + /* NOTE: These are Andrea's 3.15.0 world */ > > I thought the usual approach in qemu was to import the updated headers > first in a separate patch, rather than embeddeding new defines. Yes, those will sort themselves out when the syscalls land in the kernel and then we can import the headers. Dave -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK