From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nadav Har'El Subject: Re: [PATCH 04/10] nEPT: Fix page table format in nested EPT Date: Thu, 10 Nov 2011 13:03:34 +0200 Message-ID: <20111110110334.GA23943@fermat.math.technion.ac.il> References: <1320919040-nyh@il.ibm.com> <201111100959.pAA9xsA5019635@rice.haifa.ibm.com> <4EBBA96D.4070102@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, "Roedel, Joerg" , owasserm@redhat.com, abelg@il.ibm.com To: Avi Kivity Return-path: Received: from mailgw12.technion.ac.il ([132.68.225.12]:16435 "EHLO mailgw12.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755782Ab1KJLEK (ORCPT ); Thu, 10 Nov 2011 06:04:10 -0500 Content-Disposition: inline In-Reply-To: <4EBBA96D.4070102@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Nov 10, 2011, Avi Kivity wrote about "Re: [PATCH 04/10] nEPT: Fix page table format in nested EPT": > > @@ -287,6 +287,7 @@ struct kvm_mmu { > > bool nx; > > > > u64 pdptrs[4]; /* pae */ > > + u64 link_shadow_page_set_bits; >... > > +static void link_shadow_page(u64 *sptep, struct kvm_mmu_page *sp, u64 set_bits) > > { > > - u64 spte; > > - > > - spte = __pa(sp->spt) > > - | PT_PRESENT_MASK | PT_ACCESSED_MASK > > - | PT_WRITABLE_MASK | PT_USER_MASK; > > - mmu_spte_set(sptep, spte); > > + mmu_spte_set(sptep, __pa(sp->spt) | set_bits); > > } > > > > Minor nit: you can just use link_shadow_page_set_bits here instead of > passing it around (unless later you have a different value for the > parameter?) The problem was that link_shadow_page did not take an kvm_mmu parameter, so I don't know where to find this link_shadow_page_set_bits. So either I pass the pointer to the entire kvm_mmu to link_shadow_page, or I just pass the only field which I need... I thought that passing the single field I need was cleaner - but I can easily change it if you prefer to pass the kvm_mmu. Thanks, Nadav. -- Nadav Har'El | Thursday, Nov 10 2011, nyh@math.technion.ac.il |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |I had a lovely evening. Unfortunately, http://nadav.harel.org.il |this wasn't it. - Groucho Marx