x86: Add more specific logging for get_page_from_l1e failures
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Thu, 8 Mar 2012 09:16:09 +0000 (09:16 +0000)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Thu, 8 Mar 2012 09:16:09 +0000 (09:16 +0000)
This patch should clarify which of the two possible reasons cause the
messages
of the form "(XEN) mm.c:908:d1 Error getting mfn 29b2b (pfn
5555555555555555)
from L1 entry 0000000029b2b067 for l1e_owner=1, pg_owner=1".

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/arch/x86/mm.c

index ff2ccd95e98b7f5fd9b4d48d1b873f304d9a3823..c7fd5f785e5e1ba01e1e2b2cbbb0d5a38e1a898e 100644 (file)
@@ -889,7 +889,12 @@ get_page_from_l1e(
          */
         if ( (real_pg_owner == NULL) || (pg_owner == l1e_owner) ||
              !IS_PRIV_FOR(pg_owner, real_pg_owner) )
+        {
+            MEM_LOG("pg_owner %d l1e_owner %d, but real_pg_owner %d",
+                    pg_owner->domain_id, l1e_owner->domain_id,
+                    real_pg_owner?real_pg_owner->domain_id:-1);
             goto could_not_pin;
+        }
         pg_owner = real_pg_owner;
     }
 
@@ -905,7 +910,10 @@ get_page_from_l1e(
     write = (l1f & _PAGE_RW) &&
             ((l1e_owner == pg_owner) || !paging_mode_external(pg_owner));
     if ( write && !get_page_type(page, PGT_writable_page) )
+    {
+        MEM_LOG("Could not get page type PGT_writable_page");
         goto could_not_pin;
+    }
 
     if ( pte_flags_to_cacheattr(l1f) !=
          ((page->count_info & PGC_cacheattr_mask) >> PGC_cacheattr_base) )