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] In the shadow mode, thanks to recent patches, the shadow

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] In the shadow mode, thanks to recent patches, the shadow
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Oct 2005 12:08:17 +0000
Delivery-date: Wed, 19 Oct 2005 12:06:32 +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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID cd2a4d6da0a1128bafcd209807e9d8a3da13ff87
# Parent  2b95dde7285337e782db44aa28dfc0edddc70f6d
In the shadow mode, thanks to recent patches, the shadow
reference counts (both general counts and type counts)
are now correct in all of my testing so far.  As a result,
we should remove the shadow_tainted_refcnt flag from
the domain structure.  Leaving this flag in place would
create confusion for programmers and would also prevent
future debugging of problems in handling general and type
reference counts in the shadow mode.  In addition, the
patch also (1) drops the requirement that shadow_mode_disable()
should only be called in the domain destruction sequence
(even though it is only used that way so far), and
(2) strictly assert that the type reference count must
be 0 when we free a page from the dom heap.

Signed-off-by: Khoa Huynh <khoa@xxxxxxxxxx>

diff -r 2b95dde72853 -r cd2a4d6da0a1 xen/arch/x86/shadow32.c
--- a/xen/arch/x86/shadow32.c   Tue Oct 18 01:08:26 2005
+++ b/xen/arch/x86/shadow32.c   Tue Oct 18 09:45:29 2005
@@ -1187,14 +1187,6 @@
     if ( unlikely(!shadow_mode_enabled(d)) )
         return;
 
-    /*
-     * Currently this does not fix up page ref counts, so it is valid to call
-     * only when a domain is being destroyed.
-     */
-    BUG_ON(!test_bit(_DOMF_dying, &d->domain_flags) &&
-           shadow_mode_refcounts(d));
-    d->arch.shadow_tainted_refcnts = shadow_mode_refcounts(d);
-
     free_shadow_pages(d);
     free_writable_pte_predictions(d);
 
diff -r 2b95dde72853 -r cd2a4d6da0a1 xen/arch/x86/shadow_public.c
--- a/xen/arch/x86/shadow_public.c      Tue Oct 18 01:08:26 2005
+++ b/xen/arch/x86/shadow_public.c      Tue Oct 18 09:45:29 2005
@@ -879,14 +879,6 @@
     if ( unlikely(!shadow_mode_enabled(d)) )
         return;
 
-    /*
-     * Currently this does not fix up page ref counts, so it is valid to call
-     * only when a domain is being destroyed.
-     */
-    BUG_ON(!test_bit(_DOMF_dying, &d->domain_flags) &&
-           shadow_mode_refcounts(d));
-    d->arch.shadow_tainted_refcnts = shadow_mode_refcounts(d);
-
     free_shadow_pages(d);
     free_writable_pte_predictions(d);
 
diff -r 2b95dde72853 -r cd2a4d6da0a1 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Tue Oct 18 01:08:26 2005
+++ b/xen/common/page_alloc.c   Tue Oct 18 09:45:29 2005
@@ -610,8 +610,7 @@
         for ( i = 0; i < (1 << order); i++ )
         {
             shadow_drop_references(d, &pg[i]);
-            ASSERT(((pg[i].u.inuse.type_info & PGT_count_mask) == 0) ||
-                   shadow_tainted_refcnts(d));
+            ASSERT((pg[i].u.inuse.type_info & PGT_count_mask) == 0);
             pg[i].tlbflush_timestamp  = tlbflush_current_time();
             pg[i].u.free.cpumask      = d->cpumask;
             list_del(&pg[i].list);
diff -r 2b95dde72853 -r cd2a4d6da0a1 xen/include/asm-x86/domain.h
--- a/xen/include/asm-x86/domain.h      Tue Oct 18 01:08:26 2005
+++ b/xen/include/asm-x86/domain.h      Tue Oct 18 09:45:29 2005
@@ -32,8 +32,6 @@
     struct shadow_ops *ops;
     unsigned int shadow_mode;  /* flags to control shadow table operation */
     unsigned int shadow_nest;  /* Recursive depth of shadow_lock() nesting */
-    /* Shadow mode has tainted page reference counts? */
-    unsigned int shadow_tainted_refcnts;
 
     /* shadow hashtable */
     struct shadow_status *shadow_ht;
diff -r 2b95dde72853 -r cd2a4d6da0a1 xen/include/asm-x86/shadow.h
--- a/xen/include/asm-x86/shadow.h      Tue Oct 18 01:08:26 2005
+++ b/xen/include/asm-x86/shadow.h      Tue Oct 18 09:45:29 2005
@@ -54,8 +54,6 @@
 #define shadow_mode_log_dirty(_d) ((_d)->arch.shadow_mode & SHM_log_dirty)
 #define shadow_mode_translate(_d) ((_d)->arch.shadow_mode & SHM_translate)
 #define shadow_mode_external(_d)  ((_d)->arch.shadow_mode & SHM_external)
-
-#define shadow_tainted_refcnts(_d) ((_d)->arch.shadow_tainted_refcnts)
 
 #define shadow_linear_pg_table ((l1_pgentry_t *)SH_LINEAR_PT_VIRT_START)
 #define __shadow_linear_l2_table ((l2_pgentry_t *)(SH_LINEAR_PT_VIRT_START + \
diff -r 2b95dde72853 -r cd2a4d6da0a1 xen/include/xen/shadow.h
--- a/xen/include/xen/shadow.h  Tue Oct 18 01:08:26 2005
+++ b/xen/include/xen/shadow.h  Tue Oct 18 09:45:29 2005
@@ -12,7 +12,6 @@
 
 #define shadow_drop_references(_d, _p)          ((void)0)
 #define shadow_sync_and_drop_references(_d, _p) ((void)0)
-#define shadow_tainted_refcnts(_d)              (0)
 
 #endif
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] In the shadow mode, thanks to recent patches, the shadow, Xen patchbot -unstable <=