Merge pull request #86 from simonjbeaumont/migv2-oss-compat

CP-8988: Support environments without suspend image conversion tools
Merge pull request #87 from simonjbeaumont/migv2-metadata

CP-8987: Support extensible Xenops suspend image records
CA-140974: Only attempt one bind per host at a time

If multiple VMs with vGPUs are starting in parallel, there is the
possibility that one thread will see that a GPU is not yet bound to the
NVIDIA driver while another thread is already attempting to bind the
GPU. The second thread will then also attempt to bind the device, which
will fail with ENODEV.

Moving the mutex to the top level of the bind function means that each
thread will only check the status of a device after any other threads
have finished binding it.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #89 from johnelse/ca-140974

CA-140974: Only attempt one bind per host at a time
CP-8987: Deserialise the Xenops record on restore

We want to make sure we're receiving a valid suspend image so, as well as
reading in the right amount of length for the record (checking that the
macro-structure of the suspend image is correct), we should also attempt to
deserialise the Xenops_record to check that it is valid on a deeper level. For
now, we are not doing anything with it but the deserialisation alone checks the
validity.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #90 from simonjbeaumont/migv2-metadata

CP-8987: Deserialise the Xenops record on restore
CA-140252: Hack for legacy PV tools evtchn alignment

Since the new ioreq server in Xen, one of its event channels is now allocated
on-demand rather than eagerly at start-of-day. Therefore, when the toolstack
comes to allocate event channels for Xenstore and the console, they are
shuffled down by one.

This is fine for HVM guests with modern PV tools since they re-read this
information upon each resume. However, legacy PV tools do not and rely on these
to be the same across suspend/resume.

This patch adds an explicit workaround to realign the event channels as they
were on previous versions by having Xenopsd allocating another channel before
the two it needs. As this is done with evtchn_allocate_unbound and the guest
will not bind it, it should not affect event channel scalability in dom0.

The workaround has been made explicit and a configuration option in Xenopsd so
that we can only carry it until such a time that we no longer support HVM
guests using these legacy PV tools, at which point it can be removed.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Fix build on ocaml-4.00.1

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Add build artifacts to .gitignore

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #92 from simonjbeaumont/ignorance

Add build artifacts to .gitignore
Merge pull request #91 from simonjbeaumont/ca-140252

CA-140252: Hack for legacy PV tools evtchn alignment
CP-9206: Replace hard-coded paths with a search path

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Merge pull request #94 from jonludlam/CP-9206

CP-9206
CP-8989: Suspend_image_viewer debug utility

An executable that takes a path to a suspend image and parses and displays the
structure of it according to the new suspend image framing format.