From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [PATCH 1/1 V2] x86/AMD: Fix nested svm crash due to assertion in __virt_to_maddr Date: Mon, 8 Jul 2013 17:21:16 +0100 Message-ID: <20130708162116.GA2763@ocelot.phlegethon.org> References: <1373062237-2936-1-git-send-email-suravee.suthikulpanit@amd.com> <51DA9EDD02000078000E32F5@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <51DA9EDD02000078000E32F5@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: chegger@amazon.de, suravee.suthikulpanit@amd.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 10:13 +0100 on 08 Jul (1373278413), Jan Beulich wrote: > >>> On 06.07.13 at 00:10, wrote: > > @@ -1816,7 +1816,7 @@ svm_vmexit_do_vmload(struct vmcb_struct *vmcb, > > goto inject; > > } > > > > - svm_vmload(nv->nv_vvmcx); > > + svm_vmload_by_paddr(nv->nv_vvmcxaddr); > > /* State in L1 VMCB is stale now */ > > v->arch.hvm_svm.vmcb_in_sync = 0; > > > > @@ -1852,7 +1852,7 @@ svm_vmexit_do_vmsave(struct vmcb_struct *vmcb, > > goto inject; > > } > > > > - svm_vmsave(nv->nv_vvmcx); > > + svm_vmsave_by_paddr(nv->nv_vvmcxaddr); > > > > __update_guest_eip(regs, inst_len); > > return; > > As said on the previous version already - from all I can tell these > are GPAs, not PAs, and hence can't be passed untranslated to > VMLOAD/VMSAVE. If I'm right with this, I also can't see how this > would have worked for you... > > Apart from that I also dislike the _by_paddr suffix. I'd suggest > either just _pa, or (slightly preferable) prefixing the names with > a double underscore instead. I prefer the _pa suffix; it carries a reminder of what this version does. Tim.