CP-5970: Move xenops' cancellable watch paths

Having these paths created were interferring with devices since they were being
recreated once the device had beeen destroyed in the case of VBDs. Now we'll
keep track of the cancellable watch paths in a separate subtree of XenStore and
also tie them to their Xenops task IDs to aid debugging. Also, the semantics of
how to cancel the task have been added (removing the key).

Old path: /local/domain/0/backend/vbd/<domid>/<devid>/tools/xenops/cancel

New path: /xenops/task/<task-id>/remove-to-cancel

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

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-116819: xenlight: don't attach storage during VM_restore

When migration a VM, its VBDs need to be attached after VM_restore, during the
VM_restore_devices operation.  This is the case in classic xenopsd, and must
also be the case in the xenlight version, because the sender host in a
migration detaches itself from the storage only after sending the memory image
across.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Don't reopen already open module

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-116814: Correctly calculate shahow_memkb

There was a typo in the divisor and also the units were not converted from MB
to kB.

These values are used for machines without HAP.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #22 from robhoes/ca116819

CA-116819: xenlight: don't attach storage during VM_restore
Merge pull request #23 from simonjbeaumont/cp-6238

Fix computation of shadow_memkb for HVM domains without HAP
CA-117402: fix cd-eject for HVM guests

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #24 from robhoes/cd-eject

CA-117402: fix cd-eject for HVM guests
xenlight: use PHY backend when adding an empty CD-ROM and not using qdisk

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
xenlight: add block-xl script

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #25 from robhoes/master

CA-117409: xenopsd: fix CD-ROM handling
Add udev rules for libxl backend

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #26 from robhoes/master

Add udev rules for libxl backend
Add some debugging for the TypedTable module

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
xenlight: explicitly set run_hotplug_scripts when starting a VM

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
xenlight: fix device_by_id function

It was using the wrong device "kind" in one place.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
xenlight: wait for devices to complete hotplug after starting a VM

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
xenlight: revert to tapx.y for emulated NICs in the hotplug script (for now)

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge pull request #28 from robhoes/hotplug

xenlight: make xenopsd work with windows PV drivers