From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: 3.1/2 live migration panic Date: Fri, 18 Jan 2008 16:53:24 +0000 Message-ID: <20080118165324.GA21072@york.uk.xensource.com> References: <20080117024248.GA5331@totally.trollied.org.uk> <20080117105312.GB15867@york.uk.xensource.com> <20080117222503.GA22568@totally.trollied.org.uk> <20080118094105.GA20334@york.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="LZvS9be/3tNcYl/X" Return-path: Content-Disposition: inline In-Reply-To: <20080118094105.GA20334@york.uk.xensource.com> 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 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline At 09:41 +0000 on 18 Jan (1200649265), Tim Deegan wrote: > Either something has changed the sl4e or sl3e under our feet (surely not > - we have the shadow lock), or it could still be a missing TLB flush. > If we changed the sl4e (from one present entry to another) but didn't > flush the TLB it could cause this. So: another patch for you; can you see if this makes the crashes go away? Cheers, Tim. -- Tim Deegan Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.] --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename=patch diff -r 1e6455d608bd xen/arch/x86/mm/shadow/common.c --- a/xen/arch/x86/mm/shadow/common.c Fri Jan 18 16:20:47 2008 +0000 +++ b/xen/arch/x86/mm/shadow/common.c Fri Jan 18 16:44:00 2008 +0000 @@ -593,11 +593,14 @@ int shadow_write_guest_entry(struct vcpu * appropriately. Returns 0 if we page-faulted, 1 for success. */ { int failed; - shadow_lock(v->domain); + struct domain *d = v->domain; + shadow_lock(d); failed = __copy_to_user(p, &new, sizeof(new)); if ( failed != sizeof(new) ) - sh_validate_guest_entry(v, gmfn, p, sizeof(new)); - shadow_unlock(v->domain); + if ( sh_validate_guest_entry(v, gmfn, p, sizeof(new)) + & SHADOW_SET_FLUSH ) + flush_tlb_mask(d->domain_dirty_cpumask); + shadow_unlock(d); return (failed == 0); } @@ -609,13 +612,16 @@ int shadow_cmpxchg_guest_entry(struct vc * cmpxchg itself was successful. */ { int failed; + struct domain *d = v->domain; intpte_t t = *old; - shadow_lock(v->domain); + shadow_lock(d); failed = cmpxchg_user(p, t, new); if ( t == *old ) - sh_validate_guest_entry(v, gmfn, p, sizeof(new)); + if ( sh_validate_guest_entry(v, gmfn, p, sizeof(new)) + & SHADOW_SET_FLUSH ) + flush_tlb_mask(d->domain_dirty_cpumask); *old = t; - shadow_unlock(v->domain); + shadow_unlock(d); return (failed == 0); } --LZvS9be/3tNcYl/X 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 --LZvS9be/3tNcYl/X--