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

[Xen-changelog] [xen-unstable] [IA64] xencomm: fix dirty page leak



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1208279720 21600
# Node ID 1fbc9073a566630a93b3e16a2121b8a1cab9fd41
# Parent  2b3d3aaf8be4395144414d4a1d9e4799e5485cab
[IA64] xencomm: fix dirty page leak

This patch fixes a dirty page leak for live migration.
This is the architecture counter part of 146f214a0e63.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/mm.c        |   14 ++++++++++++++
 xen/include/asm-ia64/config.h |    2 ++
 2 files changed, 16 insertions(+)

diff -r 2b3d3aaf8be4 -r 1fbc9073a566 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Tue Apr 15 11:09:46 2008 -0600
+++ b/xen/arch/ia64/xen/mm.c    Tue Apr 15 11:15:20 2008 -0600
@@ -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 2b3d3aaf8be4 -r 1fbc9073a566 xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h     Tue Apr 15 11:09:46 2008 -0600
+++ b/xen/include/asm-ia64/config.h     Tue Apr 15 11:15:20 2008 -0600
@@ -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-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®.