From: Kouya Shimura Subject: [PATCH][IA64] xencomm: logging a dirty page Date: Fri, 14 Mar 2008 18:32:20 +0900 Message-ID: <7klk4lr6qj.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="j6KLpFWiOJ" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com, Alex Williamson , xen-ia64-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --j6KLpFWiOJ Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit 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 --j6KLpFWiOJ Content-Type: text/plain Content-Disposition: inline; filename="xencomm_log_dirty.patch" Content-Transfer-Encoding: 7bit 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__ */ --j6KLpFWiOJ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --j6KLpFWiOJ--