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

[Xen-changelog] Clean up debug tracing in mm and mm audit code.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 9b51e7637676902aa9cd4a259e04655246e9dfea
# Parent  f535708469eea4518b951162b4fa485ec38c483c
Clean up debug tracing in mm and mm audit code.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r f535708469ee -r 9b51e7637676 tools/libxc/xc_linux_restore.c
--- a/tools/libxc/xc_linux_restore.c    Sun Oct 16 11:34:37 2005
+++ b/tools/libxc/xc_linux_restore.c    Sun Oct 16 16:25:15 2005
@@ -43,6 +43,8 @@
 
     while (r < count) {
         s = read(fd, &b[r], count - r);
+        if ((s == -1) && (errno == EINTR))
+            continue;
         if (s <= 0)
             break;
         r += s;
diff -r f535708469ee -r 9b51e7637676 xen/arch/x86/audit.c
--- a/xen/arch/x86/audit.c      Sun Oct 16 11:34:37 2005
+++ b/xen/arch/x86/audit.c      Sun Oct 16 16:25:15 2005
@@ -516,16 +516,6 @@
                                    d->domain_id, mfn, page->u.inuse.type_info);
                             errors++;
                         }
-
-                        if ( (page->u.inuse.type_info & PGT_pinned) != 
PGT_pinned )
-                        {
-                            if ( !VM_ASSIST(d, 
VMASST_TYPE_writable_pagetables) )
-                            {
-                                printk("Audit %d: L1 mfn=%lx not pinned t=%"
-                                      PRtype_info "\n",
-                                       d->domain_id, mfn, 
page->u.inuse.type_info);
-                            }
-                        }
                     }
                 }
                 
diff -r f535708469ee -r 9b51e7637676 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Sun Oct 16 11:34:37 2005
+++ b/xen/arch/x86/mm.c Sun Oct 16 16:25:15 2005
@@ -366,9 +366,6 @@
 
     if ( unlikely(!get_page_type(page, type)) )
     {
-        if ( (type & PGT_type_mask) != PGT_l1_page_table )
-            MEM_LOG("Bad page type for pfn %lx (%" PRtype_info ")", 
-                    page_nr, page->u.inuse.type_info);
         put_page(page);
         return 0;
     }
@@ -438,6 +435,7 @@
 {
     unsigned long mfn = l1e_get_pfn(l1e);
     struct pfn_info *page = &frame_table[mfn];
+    int okay;
     extern int domain_iomem_in_pfn(struct domain *d, unsigned long pfn);
 
     if ( !(l1e_get_flags(l1e) & _PAGE_PRESENT) )
@@ -470,9 +468,17 @@
         d = dom_io;
     }
 
-    return ((l1e_get_flags(l1e) & _PAGE_RW) ?
+    okay = ((l1e_get_flags(l1e) & _PAGE_RW) ?
             get_page_and_type(page, d, PGT_writable_page) :
             get_page(page, d));
+    if ( !okay )
+    {
+        MEM_LOG("Error getting mfn %lx (pfn %lx) from L1 entry %" PRIpte
+                " for dom%d",
+                mfn, get_pfn_from_mfn(mfn), l1e_get_intpte(l1e), d->domain_id);
+    }
+
+    return okay;
 }
 
 
@@ -682,6 +688,7 @@
     return 1;
 
  fail:
+    MEM_LOG("Failure in alloc_l1_table: entry %d", i);
     while ( i-- > 0 )
         if ( is_guest_l1_slot(i) )
             put_page_from_l1e(pl1e[i], d);
@@ -841,6 +848,7 @@
     return 1;
 
  fail:
+    MEM_LOG("Failure in alloc_l2_table: entry %d", i);
     while ( i-- > 0 )
         if ( is_guest_l2_slot(type, i) )
             put_page_from_l2e(pl2e[i], pfn);
@@ -1453,7 +1461,7 @@
                     if ( ((x & PGT_type_mask) != PGT_l2_page_table) ||
                          ((type & PGT_type_mask) != PGT_l1_page_table) )
                         MEM_LOG("Bad type (saw %" PRtype_info
-                                "!= exp %" PRtype_info ") "
+                                " != exp %" PRtype_info ") "
                                 "for mfn %lx (pfn %lx)",
                                 x, type, page_to_pfn(page),
                                 get_pfn_from_mfn(page_to_pfn(page)));
@@ -1494,11 +1502,10 @@
         /* Try to validate page type; drop the new reference on failure. */
         if ( unlikely(!alloc_page_type(page, type)) )
         {
-            MEM_LOG("Error while validating pfn %lx for type %" PRtype_info "."
-                    " caf=%08x taf=%" PRtype_info,
-                    page_to_pfn(page), type,
-                    page->count_info,
-                    page->u.inuse.type_info);
+            MEM_LOG("Error while validating mfn %lx (pfn %lx) for type %"
+                    PRtype_info ": caf=%08x taf=%" PRtype_info,
+                    page_to_pfn(page), get_pfn_from_mfn(page_to_pfn(page)),
+                    type, page->count_info, page->u.inuse.type_info);
             /* Noone else can get a reference. We hold the only ref. */
             page->u.inuse.type_info = 0;
             return 0;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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