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] xencomm: add support for log dirty mode

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xencomm: add support for log dirty mode
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Mon, 7 Apr 2008 18:10:20 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 07 Apr 2008 02:10:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Keir,

I posted a similar patch a couple of weeks ago but
I got no response. So I split it and resend.

This patch is needed for live-migration for ia64 (and perhaps PPC).
On ia64, xencomm_copy_chunk_to() dirties a page bypassing a write
protection of TLB. i.e. the page isn't logged as dirty.

Thanks,
Kouya

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

diff -r e8f058b99171 xen/common/xencomm.c
--- a/xen/common/xencomm.c      Sat Apr 05 22:25:30 2008 +0100
+++ b/xen/common/xencomm.c      Mon Apr 07 15:40:47 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(xencomm_vaddr(paddr, page), len);
     put_page(page);
 
     return 0;
diff -r e8f058b99171 xen/include/xen/xencomm.h
--- a/xen/include/xen/xencomm.h Sat Apr 05 22:25:30 2008 +0100
+++ b/xen/include/xen/xencomm.h Mon Apr 07 15:40:47 2008 +0900
@@ -114,4 +114,12 @@ static inline unsigned long xencomm_inli
     xencomm_copy_from_guest(_d, _s, sizeof(*_d), _off);             \
 })
 
+#ifdef CONFIG_XENCOMM_MARK_DIRTY
+extern void xencomm_mark_dirty(unsigned long addr, unsigned int len);
+#else
+static inline void xencomm_mark_dirty(unsigned long addr, unsigned int len)
+{
+}
+#endif
+
 #endif /* __XENCOMM_H__ */
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xencomm: add support for log dirty mode, Kouya Shimura <=