[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 25/47] postcopy: OS support test
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH v4 25/47] postcopy: OS support test |
Date: |
Tue, 25 Nov 2014 17:34:52 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
* David Gibson (address@hidden) wrote:
> On Fri, Oct 03, 2014 at 06:47:31PM +0100, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <address@hidden>
> >
> > 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 <address@hidden>
> > ---
> > 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 <address@hidden>
> > + *
> > + * 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 / address@hidden / Manchester, UK