On Wed, Nov 19, 2014 at 06:59:38PM +0000, Dr. David Alan Gilbert wrote: > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > On Fri, Oct 03, 2014 at 06:47:38PM +0100, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> > > > > > > Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > > > --- > > > include/migration/migration.h | 2 ++ > > > include/migration/postcopy-ram.h | 6 +++++ > > > postcopy-ram.c | 49 > > > +++++++++++++++++++++++++++++++++++++++- > > > savevm.c | 9 ++++++++ > > > 4 files changed, 65 insertions(+), 1 deletion(-) > > > > > > diff --git a/include/migration/migration.h b/include/migration/migration.h > > > index be63c89..b01cc17 100644 > > > --- a/include/migration/migration.h > > > +++ b/include/migration/migration.h > > > @@ -87,6 +87,8 @@ struct MigrationIncomingState { > > > POSTCOPY_RAM_INCOMING_END > > > } postcopy_ram_state; > > > > > > + /* For the kernel to send us notifications */ > > > + int userfault_fd; > > > QEMUFile *return_path; > > > QemuMutex rp_mutex; /* We send replies from multiple threads > > > */ > > > PostcopyPMI postcopy_pmi; > > > diff --git a/include/migration/postcopy-ram.h > > > b/include/migration/postcopy-ram.h > > > index 8f237a2..413b670 100644 > > > --- a/include/migration/postcopy-ram.h > > > +++ b/include/migration/postcopy-ram.h > > > @@ -19,6 +19,12 @@ > > > int postcopy_ram_hosttest(void); > > > > > > /* > > > + * Make all of RAM sensitive to accesses to areas that haven't yet been > > > written > > > + * and wire up anything necessary to deal with it. > > > + */ > > > +int postcopy_ram_enable_notify(MigrationIncomingState *mis); > > > + > > > +/* > > > * Initialise postcopy-ram, setting the RAM to a state where we can go > > > into > > > * postcopy later; must be called prior to any precopy. > > > * called from arch_init's similarly named ram_postcopy_incoming_init > > > diff --git a/postcopy-ram.c b/postcopy-ram.c > > > index 8eccf26..925ac77 100644 > > > --- a/postcopy-ram.c > > > +++ b/postcopy-ram.c > > > @@ -485,9 +485,51 @@ int > > > postcopy_ram_incoming_cleanup(MigrationIncomingState *mis) > > > return 0; > > > } > > > > > > +/* > > > + * Mark the given area of RAM as requiring notification to unwritten > > > areas > > > + * Used as a callback on qemu_ram_foreach_block. > > > + * host_addr: Base of area to mark > > > + * offset: Offset in the whole ram arena > > > + * length: Length of the section > > > + * opaque: Unused > > > > ^^^^^^ > > This appears to be wrong - opaque is used to find the MIS. > > Fixed. > > > > > > + * Returns 0 on success > > > + */ > > > +static int postcopy_ram_sensitise_area(const char *block_name, void > > > *host_addr, > > > + ram_addr_t offset, ram_addr_t > > > length, > > > + void *opaque) > > > +{ > > > + MigrationIncomingState *mis = opaque; > > > + uint64_t tokern[2]; > > > > "tokern"? > > Now "to_kernel"
Ah! I thought it was just mispelled "token". -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
pgp9LNJ5c1dLw.pgp
Description: PGP signature