Re-work hypercall code a bit.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>