From: "Mike Sun" Subject: Re: Making pages writable again in paging_log_dirty mode Date: Fri, 19 Dec 2008 16:08:01 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > Unfortunately, I get errors about page_type_count > overflows and other kinds of type errors. I forgot to mention that I'm ending up here: int get_page_type(struct page_info *page, unsigned long type) { ... nx = x + 1; if ( unlikely((nx & PGT_count_mask) == 0) ) { MEM_LOG("Type count overflow on pfn %lx", page_to_mfn(page)); return 0; } Not sure how I'm ending up with a -1 type count. I noticed this code in "get_page_from_l1e()": /* Foreign mappings into guests in shadow external mode don't * contribute to writeable mapping refcounts. (This allows the * qemu-dm helper process in dom0 to map the domain's memory without * messing up the count of "real" writable mappings.) */ okay = (((l1f & _PAGE_RW) && !(unlikely(paging_mode_external(d) && (d != curr->domain)))) ? get_page_and_type(page, d, PGT_writable_page) : get_page(page, d)); I believe since I'm trying to make writable pages of an HVM guest domain from dom0 in log_dirty_mode, I'm going to end up just doing the get_page() instead of the get_page_and_type(). Is this my problem? Thanks, Mike