From: Tim Deegan Subject: Re: 3.1/2 live migration panic Date: Thu, 17 Jan 2008 10:53:12 +0000 Message-ID: <20080117105312.GB15867@york.uk.xensource.com> References: <20080117024248.GA5331@totally.trollied.org.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="9amGYk9869ThD9tj" Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: John Levon Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --9amGYk9869ThD9tj Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline At 08:10 +0000 on 17 Jan (1200557415), Keir Fraser wrote: > What do you mean by 'a constant'? It's a pointer into the guest linear > pagetable, which I suppose is what we expect, and for some reason there is > no PTE at that location to be read. Clearly a higher-level page directory is > missing. Possibly shadow code has got confused and thought a page directory > was present when it wasn't, or perhaps the page directory went away (and/or > was in the process of disappearing from TLBs) as the shadow fault handler > went about its business. I'm sure Tim will have some insights. :-) Hmm. Yes, it's a pointer into the (shadow) linear PT, and we've just checked that it's valid or made it so. Code inspection has lead to a lot of dead ends so far; can you try the attached patch? Cheers, Tim. -- Tim Deegan Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.] --9amGYk9869ThD9tj Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename=patch diff -r 0918b4bbffbb xen/arch/x86/mm/shadow/multi.c --- a/xen/arch/x86/mm/shadow/multi.c Tue Jan 15 11:19:14 2008 +0000 +++ b/xen/arch/x86/mm/shadow/multi.c Thu Jan 17 10:28:48 2008 +0000 @@ -1888,11 +1888,28 @@ static shadow_l1e_t * shadow_get_and_cre fetch_type_t ft) { mfn_t sl2mfn; - shadow_l2e_t *sl2e; + shadow_l2e_t *sl2e, tmp; /* Get the l2e */ sl2e = shadow_get_and_create_l2e(v, gw, &sl2mfn, ft); if ( sl2e == NULL ) return NULL; + + if ( __copy_from_user(&tmp, sl2e, sizeof(tmp)) != 0 ) + { + local_flush_tlb(); + if ( __copy_from_user(&tmp, sl2e, sizeof(tmp)) != 0 ) + SHADOW_ERROR("Can't see the l2e, even with TLB flush"); + else + SHADOW_ERROR("TLB flush made the l2e readable!"); + show_page_walk((unsigned long) sl2e); + print_gw(gw); + show_page_walk(gw->va); + printk("v->arch.shadow_table[0] == %#lx\n", + pagetable_get_pfn(v->arch.shadow_table[0])); + printk("CR3 = %#lx\n", read_cr3()); + WARN(); + } + /* Install the sl1 in the l2e if it wasn't there or if we need to * re-do it to fix a PSE dirty bit. */ if ( shadow_l2e_get_flags(*sl2e) & _PAGE_PRESENT --9amGYk9869ThD9tj 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 --9amGYk9869ThD9tj--