Currently do_memory_op() is returning int, while the hypervisor is
returning long. This will lead to wrong return informations as soon as
e.g. a pfn larger than about 2 billion (8 TB) is returned.
Use the correct long return type instead and correct the functions
expecting a pfn via the return value of do_memory_op().
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
int xc_domain_maximum_gpfn(xc_interface *xch, domid_t domid, xen_pfn_t *gpfns)
{
- int rc = do_memory_op(xch, XENMEM_maximum_gpfn, &domid, sizeof(domid));
+ long rc = do_memory_op(xch, XENMEM_maximum_gpfn, &domid, sizeof(domid));
if ( rc >= 0 )
{
return flush_mmu_updates(xch, mmu);
}
-int do_memory_op(xc_interface *xch, int cmd, void *arg, size_t len)
+long do_memory_op(xc_interface *xch, int cmd, void *arg, size_t len)
{
DECLARE_HYPERCALL;
DECLARE_HYPERCALL_BOUNCE(arg, len, XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
return ret;
}
-int do_memory_op(xc_interface *xch, int cmd, void *arg, size_t len);
+long do_memory_op(xc_interface *xch, int cmd, void *arg, size_t len);
void *xc_map_foreign_ranges(xc_interface *xch, uint32_t dom,
size_t size, int prot, size_t chunksize,