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-ia64-devel] [PATCH][IA64] xencomm: logging a dirty page

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] [PATCH][IA64] xencomm: logging a dirty page
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Fri, 14 Mar 2008 18:32:20 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Alex Williamson <alex.williamson@xxxxxx>, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 14 Mar 2008 02:32:31 -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
Hi Keir,

xencomm_copy_chunk_to() dirties a guest page.
This patch is needed for live-migration on IA64.

Thanks,
Kouya

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

diff -r f33328217eee xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Mon Mar 10 22:51:57 2008 +0000
+++ b/xen/arch/ia64/xen/mm.c    Fri Mar 14 17:53:26 2008 +0900
@@ -2904,6 +2904,15 @@ 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 paddr)
+{
+    struct domain *d = current->domain;
+    if (shadow_mode_enabled(d)) {
+        shadow_mark_page_dirty(d, paddr >> PAGE_SHIFT);
+    }
+}
+
 /*
  * Local variables:
  * mode: C
diff -r f33328217eee xen/common/xencomm.c
--- a/xen/common/xencomm.c      Mon Mar 10 22:51:57 2008 +0000
+++ b/xen/common/xencomm.c      Fri Mar 14 17:53:26 2008 +0900
@@ -323,6 +323,7 @@ xencomm_copy_chunk_to(
                (unsigned long)xencomm_vaddr(paddr, page));
 
     memcpy(xencomm_vaddr(paddr, page), (void *)from, len);
+    xencomm_mark_dirty(paddr);
     put_page(page);
 
     return 0;
diff -r f33328217eee xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h     Mon Mar 10 22:51:57 2008 +0000
+++ b/xen/include/asm-ia64/config.h     Fri Mar 14 17:53:26 2008 +0900
@@ -291,4 +291,6 @@ struct screen_info { };
 /* Define CONFIG_PRIVIFY to support privified OS (deprecated).  */
 #undef CONFIG_PRIVIFY
 
+#define CONFIG_XENCOMM_LOG_DIRTY 1
+
 #endif /* _IA64_CONFIG_H_ */
diff -r f33328217eee xen/include/xen/xencomm.h
--- a/xen/include/xen/xencomm.h Mon Mar 10 22:51:57 2008 +0000
+++ b/xen/include/xen/xencomm.h Fri Mar 14 17:53:26 2008 +0900
@@ -114,4 +114,12 @@ static inline unsigned long xencomm_inli
     xencomm_copy_from_guest(_d, _s, sizeof(*_d), _off);             \
 })
 
+#ifdef CONFIG_XENCOMM_LOG_DIRTY
+extern void xencomm_mark_dirty(unsigned long paddr);
+#else
+static inline void xencomm_mark_dirty(unsigned long paddr)
+{
+}
+#endif
+
 #endif /* __XENCOMM_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][IA64] xencomm: logging a dirty page, Kouya Shimura <=