From: Christoph Egger Subject: Re: Xen crash on HVM shutdown [PATCH] Date: Thu, 26 Jun 2008 13:24:33 +0200 Message-ID: <200806261324.34032.Christoph.Egger@amd.com> References: <200806251617.02292.Christoph.Egger@amd.com> <7642F956-7F69-4D67-8B58-DC317889C071@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <7642F956-7F69-4D67-8B58-DC317889C071@eu.citrix.com> 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 Cc: Gianluca Guida , Keir Fraser List-Id: xen-devel@lists.xenproject.org On Thursday 26 June 2008 12:32:11 Gianluca Guida wrote: > Hello, > > Sorry for the late reply. Sending emails is sometimes more > complicated than what you expect. > > On Jun 25, 2008, at 3:17 PM, Christoph Egger wrote: > > It looks to me, the recent L1 shadow changesets introduced a bug. > > Yes. This bug is triggered when the guest shuts down with pages still > OOS (e.g., paging still enabled and recently touched L1s pagetables, > or supposedly so). I unfortunately could not reproduce it, but the > inline patch should fix this. I can confirm this patch fixes the crash. Tnx. Keir: Please apply the patch. Christoph > > Thanks! > Gianluca > > Signed-off-by: Gianluca Guida > > diff -r 2be3c309e446 xen/arch/x86/mm/shadow/common.c > --- a/xen/arch/x86/mm/shadow/common.c Wed Jun 25 13:39:14 2008 -0400 > +++ b/xen/arch/x86/mm/shadow/common.c Wed Jun 25 14:54:34 2008 -0400 > @@ -630,6 +630,11 @@ > struct domain *d =3D v->domain; > > perfc_incr(shadow_oos_fixup_remove); > + > + /* If the domain is dying we might get called when deallocating > + * the shadows. Fixup tables are already freed so exit now. */ > + if (d->is_dying) > + return; > > idx =3D mfn_x(gmfn) % SHADOW_OOS_FT_HASH; > for_each_vcpu(d, v) > @@ -3168,6 +3173,7 @@ > { > free_xenheap_pages(v->arch.paging.shadow.oos_fixups, > SHADOW_OOS_FT_ORDER); > + v->arch.paging.shadow.oos_fixups =3D NULL; > } > > { =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy