]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xen: implement updated XENMEM_add_to_physmap_range ABI
authorIan Campbell <Ian.Campbell@citrix.com>
Fri, 4 Jan 2013 14:04:12 +0000 (14:04 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 4 Mar 2013 15:36:58 +0000 (10:36 -0500)
Allows for more fine grained error reporting. Only used by PVH and
ARM both of which are marked EXPERIMENTAL precisely because the ABI
is not yet stable

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/xen/mmu.c

index b09a3f2b1cc48bfd52a32350de5f203095bc050e..6698cf31e1f9cbd3f9232c00fb2ab77697c50b57 100644 (file)
@@ -2534,14 +2534,16 @@ static int pvh_add_to_xen_p2m(unsigned long lpfn, unsigned long fgmfn,
        };
        xen_ulong_t idx = fgmfn;
        xen_pfn_t gpfn = lpfn;
+       int err = 0;
 
        set_xen_guest_handle(xatp.idxs, &idx);
        set_xen_guest_handle(xatp.gpfns, &gpfn);
+       set_xen_guest_handle(xatp.errs, &err);
 
        rc = HYPERVISOR_memory_op(XENMEM_add_to_physmap_range, &xatp);
-       if (rc)
-               pr_warn("d0: Failed to map pfn (0x%lx) to mfn (0x%lx) rc:%d\n",
-                       lpfn, fgmfn, rc);
+       if (rc || err)
+               pr_warn("d0: Failed to map pfn (0x%lx) to mfn (0x%lx) rc:%d:%d\n",
+                       lpfn, fgmfn, rc, err);
        return rc;
 }