From: Ian Campbell Date: Fri, 4 Jan 2013 14:04:12 +0000 (+0000) Subject: xen: implement updated XENMEM_add_to_physmap_range ABI X-Git-Tag: next-20130312~24^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5caed269ea867f36225376a6546411ed7c106226;p=karo-tx-linux.git xen: implement updated XENMEM_add_to_physmap_range ABI 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 Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index b09a3f2b1cc4..6698cf31e1f9 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -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; }