From: Keir Fraser Subject: Re: [PATCH][SVM] fix spinlock panic Date: Thu, 18 Jun 2009 09:51:17 +0100 Message-ID: References: <200906171620.49105.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200906171620.49105.Christoph.Egger@amd.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: Christoph Egger , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 17/06/2009 15:20, "Christoph Egger" wrote: > Attached patch enables irq when initializing SVM so it's safe to take locks. > This fixes a panic like this: The bug is related to the fact you leak memory on every S3 resume, by reallocating hsa[cpu] and root_vmcb[cpu] which were never freed. Please see c/s 19784 in the staging tree which does a general cleanup and fix of start_svm(). It should fix your crash. It does change behaviour a bit -- primarily: It does not reset the ASID logic completely (I'm not certain there couldn't be VCPUs hanging around pointing at earlier generations on this CPU, in which case it would be dangerous to reset the ASID generation back to zero); Also, as well as not reallocating hsa and root_vmcb, we don't re-init them either. I don't know ehether that strictly matters but obviously we could easily re-jig the code to always clear_page() those pages unconditionally. -- Keir