From: lmingcsce Subject: About log dirty mode during migration Date: Wed, 18 Jul 2012 21:57:55 -0400 Message-ID: <9FE1F813-E101-4A19-BBE9-2C9F9472D3FF@gmail.com> Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hi All, I have several questions about log dirty mode during live migration. For my understanding, each time after XEN_DOMCTL_SHADOW_OP_CLEAN or XEN_DOMCTL_SHADOW_OP_PEEK operation, all the pages are set as read only. The following memory accesses to the memory pages will cause page fault (permission conflict) then using page_mark_dirty function to set the dirty bitmap. However, after I read the codes, I can't find the code places for the above operations: a. Where is the exact place for the domain to set all the memory pages as read only? From paging_log_dirty_op function, I can see that when the operation is XEN_DOMCTL_SHADOW_OP_CLEAN, it will call clear_page. But what is the function of this one? Why doesn't it do for XEN_DOMCTL_SHADOW_OP_PEEK? b. Where is the exact place for the domain to trap into hypervisor because of permission conflict and then set the memory pages are RW? I really can't find the places in the code. Thanks for your help. Best, Ming