CP-9983

Merge all relevant commits from xs64bit into master.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>