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

[Xen-devel] [RFC] Changing migration protocol



Hi,
  actually we found a big problem with the migration protocol: the
protocol depends on long size so if hosts are compiled with different
architectures (for instance i686 and x86_64) machines cannot migrate.

I think is actually not difficult to detect stream type and change code
to handle both cases.

However is better to to add an header to detect architecture type. This
will also detect easily ARM <-> Intel migrations. With David we spoke
about starting the new stream format with 8 bytes full of 0xff. This
will cause old toolstacks to fail the migration (they will try to
allocate more memory than possible failing before even trying to do it).

Actually the protocol is a bit different even for PV and HVM.

The actual code is quite messy and not that documented/testable. IMHO
would be better to try to come up with a better design.

Looking at protocol (xs_domain_restore and callee) there are also some
minor issues that could be addressed with a better protocol design or
different code:
- protocol require that functions allocate two arrays of p2m_size
(mostly 12 bytes for 32 bit and 16 for 64 for every page in the guest),
this means large memory usage for large guest (actually I'm not sure
this can be fixed by protocol change);
- some streams have a length and a blob without any size checks. In case
of an unsafe source or a corruption (quite unlucky but not impossible)
it could be that we try to allocate a large quantity of memory causing
dom0 to go out of memory.

Frediano



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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