Hypercall failed to handle the default case where 0 < ret_value < 4096.
The handler keeps looping over num_addresses, returning a too large
overall file size to the guest.
For a 4 byte test file, hget_bulk() would fetch + write 960 bytes.
Also moved struct definition to header + set __attribute__((packed)).
Tried to minimize actual code modifcations but we got
- several comments/printf messages edited to meet line limits
- occasionally switch some lines to put declarations or printfs in blocks
- couple more places marked TODO or FIXME to avoid non-trivial changes
- fixed PAGE_SIZE define in helpers.h to avoid redeclaration warning
- remove several chunks of dead or commented code
Co-authored-by: Steffen Schulz <steffen.schulz@intel.com>