[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen/arm: p2m: Add more debug in get_page_from_gva



commit ca4b2e52a894845f26fc5b784f465e31c4cef90b
Author:     Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Wed Nov 15 19:34:14 2017 +0000
Commit:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Wed Nov 15 17:37:31 2017 -0800

    xen/arm: p2m: Add more debug in get_page_from_gva
    
    The function get_page_from_gva is used by copy_*_guest helpers to
    translate a guest virtual address to a machine physical address and take
    reference on the page.
    
    There are a couple of errors paths that will return the same value making
    it difficult to know the exact error. Add more debug in each error patch
    only for debug-build.
    
    This should help narrowing down the intermittent failure with the
    hypercall GNTTABOP_copy (see [1]).
    
    [1] https://lists.xen.org/archives/html/xen-devel/2017-11/msg00942.html
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
    Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    Signed-off-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/arm/p2m.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index f6b3d8e..417609e 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -1428,16 +1428,29 @@ struct page_info *get_page_from_gva(struct vcpu *v, 
vaddr_t va,
     par = gvirt_to_maddr(va, &maddr, flags);
 
     if ( par )
+    {
+        dprintk(XENLOG_G_DEBUG,
+                "%pv: gvirt_to_maddr failed va=%#"PRIvaddr" flags=0x%lx 
par=%#"PRIx64"\n",
+                v, va, flags, par);
         goto err;
+    }
 
     if ( !mfn_valid(maddr_to_mfn(maddr)) )
+    {
+        dprintk(XENLOG_G_DEBUG, "%pv: Invalid MFN %#"PRI_mfn"\n",
+                v, mfn_x(maddr_to_mfn(maddr)));
         goto err;
+    }
 
     page = mfn_to_page(maddr_to_mfn(maddr));
     ASSERT(page);
 
     if ( unlikely(!get_page(page, d)) )
+    {
+        dprintk(XENLOG_G_DEBUG, "%pv: Failing to acquire the MFN 
%#"PRI_mfn"\n",
+                v, mfn_x(maddr_to_mfn(maddr)));
         page = NULL;
+    }
 
 err:
     if ( !page && p2m->mem_access_enabled )
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.