From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: xm save + restore crashes Windows 200832-bit(4.0.2-rc2-pre) (AMD only) Date: Tue, 25 Jan 2011 22:21:49 +0000 Message-ID: <20110125222149.GA8849@whitby.uk.xensource.com> References: <20110125092440.GA13241@whitby.uk.xensource.com> <20110125103938.GB13241@whitby.uk.xensource.com> <20110125105313.GC13241@whitby.uk.xensource.com> <20110125143722.GF13241@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" 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: James Harper Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org At 22:11 +0000 on 25 Jan (1295993487), James Harper wrote: > > > > At 13:35 +0000 on 25 Jan (1295962540), James Harper wrote: > > > So the problem is somewhere past hvm_set_segment_register, and > because > > > it's amd only, probably in or beyond svm_set_segment_register. The > first > > > thing I notice in that routine is that there is a case for those 4 > > > registers... although all it seems to do is svm_sync_vmcb before and > > > svm_vmload after setting. I don't know what those two do though. > > > > Hmm; I suspect the bug here is actually in the save side -- the > syncing > > of the vmcb in the save routine is not conditional on v == current, > and > > the "already synced" bit that it would otherwise gate on isn't > properly > > initialized. > > > > Try the attached patch; I'm sorry to say that I suspect it will fix > the > > odd output of xen_hvmctx but probably won't fix the BSOD. :( > > > > Just to clarify, in the restore path I print the values to be saved to > the segment registers, then I read the segment registers and print the > values that are in them. They aren't the same. Doesn't that sound like a > problem on the restore side? That would depend on how you read the values after the restore - the patch is for a bug that I think is causing svm_get_segment_register() to corrupt the vmcb if it's called before the vcpu is first scheduled (and to return the corrupted values). Cheers, Tim. -- Tim Deegan Principal Software Engineer, Xen Platform Team Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)