WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Minor cleanups, in preparation for merging with mainline

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Minor cleanups, in preparation for merging with mainline.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Thu, 24 Mar 2005 22:01:27 +0000
Delivery-date: Tue, 05 Apr 2005 16:19:13 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1261.1.1, 2005/03/24 22:01:27+00:00, mafetter@xxxxxxxxxxxxxxxx

        Minor cleanups, in preparation for merging with mainline.
        Removal of some debug hooks.
        
        Signed-off-by: michael.fetterman@xxxxxxxxxxxx



 arch/x86/domain.c                    |    4 +-
 arch/x86/domain_build.c              |    6 +---
 arch/x86/mm.c                        |    6 ++--
 arch/x86/shadow.c                    |   25 +++++++++++-------
 arch/x86/x86_32/asm-offsets.c        |    6 ----
 arch/x86/x86_32/domain_page.c        |    8 +----
 common/page_alloc.c                  |   11 --------
 include/asm-x86/mm.h                 |   47 +----------------------------------
 include/asm-x86/shadow.h             |    1 
 include/asm-x86/x86_32/domain_page.h |   18 -------------
 10 files changed, 30 insertions(+), 102 deletions(-)


diff -Nru a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     2005-04-05 12:19:18 -04:00
+++ b/xen/arch/x86/domain.c     2005-04-05 12:19:18 -04:00
@@ -238,7 +238,7 @@
         d->shared_info = (void *)alloc_xenheap_page();
         memset(d->shared_info, 0, PAGE_SIZE);
         ed->vcpu_info = &d->shared_info->vcpu_data[ed->eid];
-        SHARE_PFN_WITH_DOMAIN2(virt_to_page(d->shared_info), d);
+        SHARE_PFN_WITH_DOMAIN(virt_to_page(d->shared_info), d);
         machine_to_phys_mapping[virt_to_phys(d->shared_info) >> 
                                PAGE_SHIFT] = INVALID_M2P_ENTRY;
 
@@ -262,7 +262,7 @@
             mk_l3_pgentry(__pa(d->arch.mm_perdomain_l2) | __PAGE_HYPERVISOR);
 #endif
 
-        shadow_lock_init(d);
+        shadow_lock_init(d);        
         INIT_LIST_HEAD(&d->arch.free_shadow_frames);
     }
 }
diff -Nru a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c       2005-04-05 12:19:18 -04:00
+++ b/xen/arch/x86/domain_build.c       2005-04-05 12:19:18 -04:00
@@ -426,7 +426,7 @@
         d->shared_info->vcpu_data[i].evtchn_upcall_mask = 1;
     d->shared_info->n_vcpu = smp_num_cpus;
 
-    /* setup monitor table */
+    /* Set up monitor table */
     update_pagetables(ed);
 
     /* Install the new page tables. */
@@ -472,12 +472,10 @@
     for ( pfn = 0; pfn < d->tot_pages; pfn++ )
     {
         mfn = pfn + (alloc_start>>PAGE_SHIFT);
-#if 0
 #ifndef NDEBUG
 #define REVERSE_START ((v_end - dsi.v_start) >> PAGE_SHIFT)
-        if ( pfn > REVERSE_START )
+        if ( !opt_dom0_translate && (pfn > REVERSE_START) )
             mfn = (alloc_end>>PAGE_SHIFT) - (pfn - REVERSE_START);
-#endif
 #endif
         ((u32 *)vphysmap_start)[pfn] = mfn;
         machine_to_phys_mapping[mfn] = pfn;
diff -Nru a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c 2005-04-05 12:19:18 -04:00
+++ b/xen/arch/x86/mm.c 2005-04-05 12:19:18 -04:00
@@ -1088,7 +1088,7 @@
 }
 
 
-void _put_page_type(struct pfn_info *page)
+void put_page_type(struct pfn_info *page)
 {
     u32 nx, x, y = page->u.inuse.type_info;
 
@@ -1143,7 +1143,7 @@
 }
 
 
-int _get_page_type(struct pfn_info *page, u32 type)
+int get_page_type(struct pfn_info *page, u32 type)
 {
     u32 nx, x, y = page->u.inuse.type_info;
 
@@ -1880,7 +1880,7 @@
 
         case MMU_MACHPHYS_UPDATE:
 
-            // HACK ALERT...  This about this later...
+            // HACK ALERT...  Need to think about this some more...
             //
             if ( unlikely(shadow_mode_translate(FOREIGNDOM) && IS_PRIV(d)) )
             {
diff -Nru a/xen/arch/x86/shadow.c b/xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c     2005-04-05 12:19:18 -04:00
+++ b/xen/arch/x86/shadow.c     2005-04-05 12:19:18 -04:00
@@ -2,6 +2,7 @@
  * arch/x86/shadow.c
  * 
  * Copyright (c) 2005 Michael A Fetterman
+ * Based on an earlier implementation by Ian Pratt et al
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -658,11 +659,6 @@
 
     ASSERT( phystab );
 
-#ifdef WATCH_MAP_DOMAIN_CALLERS
-    int old_map_domain_mem_noisy = map_domain_mem_noisy;
-    map_domain_mem_noisy = 0;
-#endif
-
     l2 = map_domain_mem(phystab);
     if ( !l2_pgentry_val(l2e = l2[l2_table_offset(va)]) )
     {
@@ -685,10 +681,6 @@
                                             __PAGE_HYPERVISOR);
     unmap_domain_mem(l1);
 
-#ifdef WATCH_MAP_DOMAIN_CALLERS
-    map_domain_mem_noisy = old_map_domain_mem_noisy;
-#endif
-
     return 1;
 }
 
@@ -718,6 +710,21 @@
         ASSERT(pfn < (1u<<20));
 
         set_p2m_entry(d, pfn, mfn);
+
+        list_ent = page->list.next;
+    }
+
+    list_ent = d->xenpage_list.next;
+    while ( list_ent != &d->xenpage_list )
+    {
+        page = list_entry(list_ent, struct pfn_info, list);
+        mfn = page_to_pfn(page);
+        pfn = machine_to_phys_mapping[mfn];
+        if ( (pfn != INVALID_M2P_ENTRY) &&
+             (pfn < (1u<<20)) )
+        {
+            set_p2m_entry(d, pfn, mfn);
+        }
 
         list_ent = page->list.next;
     }
diff -Nru a/xen/arch/x86/x86_32/asm-offsets.c 
b/xen/arch/x86/x86_32/asm-offsets.c
--- a/xen/arch/x86/x86_32/asm-offsets.c 2005-04-05 12:19:18 -04:00
+++ b/xen/arch/x86/x86_32/asm-offsets.c 2005-04-05 12:19:18 -04:00
@@ -6,7 +6,6 @@
 
 #include <xen/config.h>
 #include <xen/sched.h>
-#include <xen/config.h>
 
 #define DEFINE(_sym, _val) \
     __asm__ __volatile__ ( "\n->" #_sym " %0 " #_val : : "i" (_val) )
@@ -76,9 +75,4 @@
     BLANK();
 
     DEFINE(FIXMAP_apic_base, fix_to_virt(FIX_APIC_BASE));
-
-#if PERF_COUNTERS
-    OFFSET(PERFC_hypercalls, struct perfcounter, hypercalls);
-    OFFSET(PERFC_exceptions, struct perfcounter, exceptions);
-#endif
 }
diff -Nru a/xen/arch/x86/x86_32/domain_page.c 
b/xen/arch/x86/x86_32/domain_page.c
--- a/xen/arch/x86/x86_32/domain_page.c 2005-04-05 12:19:18 -04:00
+++ b/xen/arch/x86/x86_32/domain_page.c 2005-04-05 12:19:18 -04:00
@@ -26,11 +26,6 @@
 /* Use a spare PTE bit to mark entries ready for recycling. */
 #define READY_FOR_TLB_FLUSH (1<<10)
 
-#ifdef WATCH_MAP_DOMAIN_CALLERS
-int map_domain_mem_noisy = 1;
-#endif
-
-
 static void flush_all_ready_maps(void)
 {
     unsigned long *cache = mapcache;
@@ -43,7 +38,8 @@
     while ( ((unsigned long)(++cache) & ~PAGE_MASK) != 0 );
 }
 
-void *_map_domain_mem(unsigned long pa)
+
+void *map_domain_mem(unsigned long pa)
 {
     unsigned long va;
     unsigned int idx, cpu = smp_processor_id();
diff -Nru a/xen/common/page_alloc.c b/xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   2005-04-05 12:19:18 -04:00
+++ b/xen/common/page_alloc.c   2005-04-05 12:19:18 -04:00
@@ -350,11 +350,6 @@
 
     printk("Scrubbing Free RAM: ");
 
-#ifdef WATCH_MAP_DOMAIN_CALLERS
-    int old_map_domain_mem_noisy = map_domain_mem_noisy;
-    map_domain_mem_noisy = 0;
-#endif
-
     for ( pfn = 0; pfn < (bitmap_size * 8); pfn++ )
     {
         /* Every 100MB, print a progress dot and appease the watchdog. */
@@ -381,10 +376,6 @@
         spin_unlock_irqrestore(&heap_lock, flags);
     }
 
-#ifdef WATCH_MAP_DOMAIN_CALLERS
-    map_domain_mem_noisy = old_map_domain_mem_noisy;
-#endif
-
     printk("done.\n");
 }
 
@@ -599,7 +590,7 @@
                        pg[i].count_info, pg[i].u.inuse.type_info);
             }
 
-            ASSERT( (pg[i].u.inuse.type_info & PGT_count_mask) == 0 );
+            ASSERT((pg[i].u.inuse.type_info & PGT_count_mask) == 0);
             pg[i].tlbflush_timestamp  = tlbflush_current_time();
             pg[i].u.free.cpu_mask     = cpu_mask;
             list_del(&pg[i].list);
diff -Nru a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
--- a/xen/include/asm-x86/mm.h  2005-04-05 12:19:18 -04:00
+++ b/xen/include/asm-x86/mm.h  2005-04-05 12:19:18 -04:00
@@ -148,21 +148,6 @@
         list_add_tail(&(_pfn)->list, &(_dom)->xenpage_list);                \
         spin_unlock(&(_dom)->page_alloc_lock);                              \
     } while ( 0 )
-#define SHARE_PFN_WITH_DOMAIN2(_pfn, _dom)                                  \
-    do {                                                                    \
-        page_set_owner((_pfn), (_dom));                                     \
-        /* The incremented type count is intended to pin to 'writable'. */  \
-        (_pfn)->u.inuse.type_info = PGT_writable_page | PGT_validated | 1;  \
-        wmb(); /* install valid domain ptr before updating refcnt. */       \
-        spin_lock(&(_dom)->page_alloc_lock);                                \
-        /* _dom holds an allocation reference + writable ref */             \
-        ASSERT((_pfn)->count_info == 0);                                    \
-        (_pfn)->count_info |= PGC_allocated | 2;                            \
-        if ( unlikely((_dom)->xenheap_pages++ == 0) )                       \
-            get_knownalive_domain(_dom);                                    \
-        list_add_tail(&(_pfn)->list, &(_dom)->page_list);                   \
-        spin_unlock(&(_dom)->page_alloc_lock);                              \
-    } while ( 0 )
 
 extern struct pfn_info *frame_table;
 extern unsigned long frame_table_size;
@@ -225,36 +210,8 @@
     return 1;
 }
 
-//#define MFN1_TO_WATCH 0x1d8
-#ifdef MFN1_TO_WATCH
-#define get_page_type(__p, __t) (                                             \
-{                                                                             \
-    struct pfn_info *_p = (__p);                                              \
-    u32 _t = (__t);                                                           \
-    if ( page_to_pfn(_p) == MFN1_TO_WATCH )                                   \

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Minor cleanups, in preparation for merging with mainline., BitKeeper Bot <=