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-devel

[Xen-devel] [PATCH] fix c/s 18720 & 18731

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] fix c/s 18720 & 18731
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Wed, 29 Oct 2008 11:30:35 +0000
Delivery-date: Wed, 29 Oct 2008 04:30:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Entirely removing the tail of free_page_type() wasn't correct - the
type reference must still be dropped for partial pages.

Admittedly, I'm not sure the flush time stamp update is also needed
here, but it seems safer to also copy it from free_page_type()'s former
tail.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2008-10-27/xen/arch/x86/domain.c
===================================================================
--- 2008-10-27.orig/xen/arch/x86/domain.c       2008-10-28 15:30:37.000000000 
+0100
+++ 2008-10-27/xen/arch/x86/domain.c    2008-10-28 15:31:15.000000000 +0100
@@ -42,6 +42,7 @@
 #include <asm/mpspec.h>
 #include <asm/ldt.h>
 #include <asm/hypercall.h>
+#include <asm/shadow.h>
 #include <asm/hvm/hvm.h>
 #include <asm/hvm/support.h>
 #include <asm/debugreg.h>
@@ -1687,6 +1688,16 @@ static int relinquish_memory(
             {
                 if ( free_page_type(page, x, 0) != 0 )
                     BUG();
+
+                if ( !(shadow_mode_enabled(d) &&
+                       (page->count_info & PGC_page_table)) )
+                    page->tlbflush_timestamp = tlbflush_current_time();
+
+                if ( x & PGT_partial )
+                {
+                    wmb();
+                    page->u.inuse.type_info--;
+                }
                 break;
             }
         }




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

<Prev in Thread] Current Thread [Next in Thread>