CP-8320: Initial commit for xs64bit

Changes based on sm.hg tip 29f9f9595fb7

Signed-off-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
CP 8320: Improved formatting in README and INSTALL files

Signed-off-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
CP-8320: Build using the git sm repo

Signed-off-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
CA-106886: Don't update vhd-blocks during SR.scan

Don't bother updating the vhd-blocks in the XAPI database as this is
owned by the GC and there's no synchronisation for this.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Vineeth Thampi Raveendran <vineeth.thampi@citrix.com>
Reviewed-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>
Imported-by: Thanos Makatos <thanos.makatos@citrix.com>

GitHub: closes #119 on xapi-project/sm
(cherry picked from commit 083722c17dcc8a29371ae2a4fd00c6a87ce3275d)
CA-114341: check return value of LVHD plugins

Initially the return value of the call to the plugin was checked (when
the plugin was called via the xe command), and when xe was replaced the
check was removed. It is unclear why this happened (no justification in
the commit messages), so it might be an omission.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Imported-by: Thanos Makatos <thanos.makatos@citrix.com>

(cherry picked from commit 4bdb01aa761d73519c2e14410a3e63f291918524)
CA-114341: GC: acquire VDI lock non-blocking

The GC needs to acquire the SR and VDI locks in the reverse order
VDI.activate/deactivate do, which leads to temporary deadlock that is
resolved when the VDI.activate/deactivate give up. This patch makes the
GC to simply try to acquire the VDI lock, if it fails to do so it skips
the VDI, and that leads to the GC releasing the SR lock.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Imported-by: Thanos Makatos <thanos.makatos@citrix.com>

(cherry picked from commit a47ceebbbab678079f72851d7fd87afb0de3cf97)
CA-114341: explicitly use keyword argument

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Imported-by: Thanos Makatos <thanos.makatos@citrix.com>

(cherry picked from commit 1f5db2b390da485ecd77f7e4d985f65450e87e11)
CA-114341: don't try to reacquire the lock

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Imported-by: Thanos Makatos <thanos.makatos@citrix.com>

(cherry picked from commit 8c1c069c58817c5e7152fe2f0286f554c65763e6)
CA-114341: increase lock retry count

The current value of lock retry is too small and results in VDI.activate
giving up trying to acquire the lock too early. Doubling this value
seems to rectify the problem.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
Imported-by: Thanos Makatos <thanos.makatos@citrix.com>

(cherry picked from commit d1767c42b04363d982959f4a91e041939cadb93e)