From: Nadav Har'El Subject: Re: [PATCH 02/10] nEPT: MMU context for nested EPT Date: Wed, 23 Nov 2011 17:06:23 +0200 Message-ID: <20111123150623.GA2566@fermat.math.technion.ac.il> References: <1320919040-nyh@il.ibm.com> <201111100958.pAA9wrIv019614@rice.haifa.ibm.com> <4EBBC848.7050400@redhat.com> <20111110144027.GB3327@fermat.math.technion.ac.il> <4EBBEB65.8050600@redhat.com> <20111110200532.GA17475@fermat.math.technion.ac.il> <4EBE4CE0.7070708@redhat.com> <20111112213747.GA741@fermat.math.technion.ac.il> <4EBFAA47.406@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , kvm@vger.kernel.org, "Roedel, Joerg" , abelg@il.ibm.com To: Orit Wasserman Return-path: Received: from mailgw12.technion.ac.il ([132.68.225.12]:51675 "EHLO mailgw12.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756248Ab1KWPGp (ORCPT ); Wed, 23 Nov 2011 10:06:45 -0500 Content-Disposition: inline In-Reply-To: <4EBFAA47.406@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Nov 13, 2011, Orit Wasserman wrote about "Re: [PATCH 02/10] nEPT: MMU context for nested EPT": > Maybe this patch can help, this is roughly what Avi wants (I hope) done very quickly. > I'm sorry I don't have setup to run nested VMX at the moment so i can't test it. Hi Orit, thanks for the code - I'm now working on incorporating something based on this into my patch. However, I do have a question: > +static int nested_ept_init_mmu_context(struct kvm_vcpu *vcpu) > +{ > + int r = kvm_init_shadow_mmu(vcpu, &vcpu->arch.mmu); > + > + vcpu->arch.nested_mmu.gva_to_gpa = EPT_gva_to_gpa_nested; > + > + return r; > +} I didn't see you actually call this function anywhere - how is it supposed to work? The way I understand the current code, kvm_mmu_reset_context() calls init_kvm_mmu() which (in our case) calls init_kvm_nested_mmu(). I think the above gva_to_gpa setting should be there - right? It seems we need a fifth case in that function. But at that point in mmu.c, how will I be able to check if this is the nested EPT case? Do you have any suggestion? Thanks, Nadav. -- Nadav Har'El | Wednesday, Nov 23 2011, nyh@math.technion.ac.il |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |This message contains 100% recycled http://nadav.harel.org.il |characters.