Skip to contentSkip to conversation

xencomm: add support for log dirty mode

PATCH New Kouya Shimura 1 participant 1 message Apr 7, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xencomm: add support for log dirty mode

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

xen/common/xencomm.c +1 -0
diff -r e8f058b99171 xen/common/xencomm.c
@@ -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;
xen/include/xen/xencomm.h +8 -0
diff -r e8f058b99171 xen/include/xen/xencomm.h
@@ -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
[email protected]
http://lists.xensource.com/xen-devel