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

[Xen-ia64-devel] [PATCH] xencomm: fix dirty page leak

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] xencomm: fix dirty page leak
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Wed, 9 Apr 2008 15:36:00 +0900
Delivery-date: Tue, 08 Apr 2008 23:36:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
This patch fixes a dirty page leak for live migration.
The common part of this fix is already applied to upstream.
  http://xenbits.xensource.com/xen-unstable.hg?rev/146f214a0e63

Thanks,
Kouya

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

diff -r feee6422144f xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Tue Apr 01 11:29:03 2008 -0600
+++ b/xen/arch/ia64/xen/mm.c    Wed Apr 09 15:29:15 2008 +0900
@@ -2903,6 +2903,20 @@ int is_iomem_page(unsigned long mfn)
     return (!mfn_valid(mfn) || (page_get_owner(mfn_to_page(mfn)) == dom_io));
 }
 
+void xencomm_mark_dirty(unsigned long addr, unsigned int len)
+{
+    struct domain *d = current->domain;
+    unsigned long gpfn;
+    unsigned long end_addr = addr + len;
+
+    if (shadow_mode_enabled(d)) {
+        for (addr &= PAGE_MASK; addr < end_addr; addr += PAGE_SIZE) {
+            gpfn = get_gpfn_from_mfn(virt_to_mfn(addr));
+            shadow_mark_page_dirty(d, gpfn);
+        }
+    }
+}
+
 /*
  * Local variables:
  * mode: C
diff -r feee6422144f xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h     Tue Apr 01 11:29:03 2008 -0600
+++ b/xen/include/asm-ia64/config.h     Wed Apr 09 15:29:15 2008 +0900
@@ -291,4 +291,6 @@ struct screen_info { };
 /* Define CONFIG_PRIVIFY to support privified OS (deprecated).  */
 #undef CONFIG_PRIVIFY
 
+#define CONFIG_XENCOMM_MARK_DIRTY 1
+
 #endif /* _IA64_CONFIG_H_ */
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH] xencomm: fix dirty page leak, Kouya Shimura <=