From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: [PATCH V10 09/14] xen: implement updated XENMEM_add_to_physmap_range ABI Date: Thu, 12 Dec 2013 21:10:16 -0500 Message-ID: <1386900621-27528-10-git-send-email-konrad.wilk@oracle.com> References: <1386900621-27528-1-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VrIDJ-0002b0-HZ for xen-devel@lists.xenproject.org; Fri, 13 Dec 2013 02:10:49 +0000 Received: by mail-qc0-f174.google.com with SMTP id n7so1046566qcx.33 for ; Thu, 12 Dec 2013 18:10:46 -0800 (PST) In-Reply-To: <1386900621-27528-1-git-send-email-konrad.wilk@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, george.dunlap@eu.citrix.com, ian.jackson@eu.citrix.com, mukesh.rathor@oracle.com, tim@xen.org, jbeulich@suse.com, boris.ostrovsky@oracle.com, david.vrabel@citrix.com Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org From: Ian Campbell 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 --- arch/x86/xen/mmu.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 1d1fbdb..a31449f 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -2541,14 +2541,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; } -- 1.7.7.6