[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 0/6] [VERY RFC] Migration Stream v2


Presented here for early review is a basic implementation of PV guest
migration using the v2 stream format.

PV non-live migration is believed-working; i.e. xl save/restore.

One caveat is 32bit PV domains and 64 bit toolstacks, which is expected not to
work currently.  There is an architectural problem when using the toolstack
domains m2p to shoot Xen mappings from a PV guest, which is hidden by another
over-aggressive bug in the live part of v1 migration, which is why v1 currently
works (albeit with a risk of shooting too many guest PTEs).  As 'live' is not
yet implemented in v2, the second bug has not been replicated.

The code has been a clean rewrite, using the v1 code as a reference but
avoiding obsolete areas (e.g. how to modify the pagetables of a 32 non-pae
guest on 32bit pae Xen).

Some design decisions have been take very deliberately (e.g. splitting the
logic for PV and hvm migration) while others have been more along the lines of
"I think its a sensible thing to do given a lack of any evidence/opinion to
the contrary".

The error handling is known to only semi-consistent.  Functions return 0 for
success and non-zero for failure.  This is typically -1, although errno is not
always relevant.  However, the logging messages should all be relevant and
correct.  Making this properly consistent will involve wider effort across all
of libxc.

 * 1 is a gross hack to allow the two versions to coexist
 * 2 is mainly a header file following the specification (draft E)
 * 3 is a set of python scripts for validation of streams
 * 4 is some common PV code
 * 5 is an implementation of PV save
 * 6 is an implementation of PV restore

The rough order of forthcoming work is:
 * Fix architectural bug (new hypercall required)
 * Get live migration working without the risk of corrupting 32bit guests
 * Get HVM migration working (conceptually easier)
 * Get some of the optional features working (tmem blobs, etc)

An area needing discussing is how to do v1 -> v2 transformations for a one-time
upgrade.  There is a (very basic currently) python script which can pick a v1
stream, and a separate python library to write v2 streams.

One option would be to combine these two into a program which takes two fds,
which libxc can exec() out to.  There is deliberate flexibility in the v2
restore code which allows a v1 -> v2 transformation on a stream without seeking.

Anyway - the code is presented for initial comment/query/critisixm.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.