CA-136278: ensure '/local/domain/0/domid = 0'

This is needed for libxl functions to work. Without this expect strange
errors.

Signed-off-by: David Scott <dave.scott@citrix.com>
CA-136150: always create /var/run/xen (if it doesn't already exist)

libxl will fail to execute pygrub without this directory.

Signed-off-by: David Scott <dave.scott@citrix.com>
Merge pull request #81 from djs55/CA-136276

Make libxl happy
CA-138930: Xapi should not call domain_set_memmap_limit for HVM domains.

Since Xen 4.2 the hypercall behind xc_domain_set_memmap_limit() is not
permitted for HVM domains. Xapi should only call this for PV domains.

Signed-off-by: Akshay <akshay.ramani@citrix.com>
CA-139894: Fix waiting for VM.remove

Due to a change in semantics of UPDATES.get, task_wait would
occasionally not wait.

This also adds back in error handling into the VM.remove path.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Add a comment showing why an assert is there.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Merge pull request #83 from jonludlam/CA-139894

CA-139894
Merge pull request #82 from akshayramani/HVM

CA-138930: Xapi should not call domain_set_memmap_limit for HVM domains.
Partial revert of 9ccef3ed2505ff47ea2f601308bf0e8a988c6a11

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Revert of ef3bf4bdfb3ccbe1b54c0514a53777a1dc43ece2

With a slight change to Io.read_int invocation

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
CP-8784: Add 64-bit read/write to Io module

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CP-8784: Support fd mappings in Cancellable_subprocess

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CP-8784: Use new suspend-image format

Detect older formats and pipe through conversion tool. Newer formats have
a proper framing protocol.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>

Conflicts:
	myocamlbuild.ml
	setup.ml
	xc/domain.ml
CP-8784: Move signatures into Suspend_image module

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CP-8784: Get rid of filesystem on suspend images

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CP-8784: Replace Thread.delay with Mutex/Condition

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CP-8784: Factor conversion script into Suspend_image

Put with_conversion_script wrapper into the Suspend_image module so that the
behvaiour of Domain.restore_common is clearer.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CP-8784: Factor out reading of legacy qemu sig

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CP-8782: Document new suspend image framing format

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Update qemu-dm path for Xen-4.4

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>