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 14:37:22 +0000 Message-ID: <20110125143722.GF13241@whitby.uk.xensource.com> References: <20110125092440.GA13241@whitby.uk.xensource.com> <20110125103938.GB13241@whitby.uk.xensource.com> <20110125105313.GC13241@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="3V7upXqbjpZ4EhLz" 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 --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline 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. :( Cheers, Tim. -- Tim Deegan Principal Software Engineer, Xen Platform Team Citrix Systems UK Ltd. (Company #02937203, SL9 0BG) --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: attachment; filename="vmcb-sync" diff -r 9b453f96dd46 xen/arch/x86/hvm/svm/vmcb.c --- a/xen/arch/x86/hvm/svm/vmcb.c Fri Jan 21 16:03:04 2011 +0000 +++ b/xen/arch/x86/hvm/svm/vmcb.c Tue Jan 25 14:36:32 2011 +0000 @@ -280,6 +280,7 @@ int svm_create_vmcb(struct vcpu *v) } arch_svm->vmcb_pa = virt_to_maddr(arch_svm->vmcb); + arch_svm->vmcb_in_sync = 1; return 0; } --3V7upXqbjpZ4EhLz 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 --3V7upXqbjpZ4EhLz--