From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 04/10] nEPT: Fix page table format in nested EPT Date: Thu, 10 Nov 2011 14:21:33 +0200 Message-ID: <4EBBC1CD.7020904@redhat.com> References: <1320919040-nyh@il.ibm.com> <201111100959.pAA9xsA5019635@rice.haifa.ibm.com> <4EBBA96D.4070102@redhat.com> <20111110110334.GA23943@fermat.math.technion.ac.il> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, "Roedel, Joerg" , owasserm@redhat.com, abelg@il.ibm.com To: "Nadav Har'El" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:62906 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753313Ab1KJMVq (ORCPT ); Thu, 10 Nov 2011 07:21:46 -0500 In-Reply-To: <20111110110334.GA23943@fermat.math.technion.ac.il> Sender: kvm-owner@vger.kernel.org List-ID: On 11/10/2011 01:03 PM, Nadav Har'El wrote: > 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. Ah, doesn't matter either way. -- error compiling committee.c: too many arguments to function