CA-327822: account for memory-offset during set_maxmem
CA-327822: account for memory-offset during set_maxmem

The addition of PV-shim mode exposed the following issue. For a pv-in-pvh
guest, memory-offset value will include the whole amount of xen-shim
memory (see CA-327265), which can be quite large (e.g. 68MB for a 4GB RAM
guest). This leads to a situation when:

    * Initial domain's memory: 4G + 68M
        * xen-shim memory: 68M
        * PV kernel memory: 4G
    * memory-offset: 68M
    * memory/target: 4G
    * set_maxmem hypercall: 4G

This leads to a problem during ballooning up: Xen (L0) will forbid
the domain to have more than 4G of memory and the following situation
would be observed:

    * Domain's memory: 4G
        * xen-shim memory: 68M
        * PV kernel memory: 4G - 68M

Which makes a balloon driver to believe it hasn't yet reached the target
of 4GB and to constantly ask Xen to give more pages. Meanwhile squeezed
would consider that the domain couldn't reach its target in time.

Fix this situation by adding the memory-offset value into set_maxmem.

Signed-off-by: Sergey Dyasli <356876ec7baf9e4367af5f5aae724d9a997e05bf@citrix.com>

robhoes/squeezed