From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v3 09/10] KVM: MMU: fix MTRR update Date: Thu, 14 May 2015 10:43:43 +0200 Message-ID: <5554603F.8020306@redhat.com> References: <1431499348-25188-1-git-send-email-guangrong.xiao@linux.intel.com> <1431499348-25188-10-git-send-email-guangrong.xiao@linux.intel.com> <20150513084341.GA4910@kernel> <55535B40.2060504@redhat.com> <20150514001648.GA5206@kernel> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Xiao Guangrong , gleb@kernel.org, mtosatti@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Wanpeng Li Return-path: In-Reply-To: <20150514001648.GA5206@kernel> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 14/05/2015 02:16, Wanpeng Li wrote: > >SPTEs are kept around and cached. The "role" field is used as the hash > >key; if the role doesn't change, SPTEs are reused, so you have to zap > >the SPTEs explicitly. > > Btw, why the patch changelog mentioned that the root shadow page will be > reused, I think it will be zapped in mmu_free_roots. Who has set sp->role.invalid on it? If no one has, it's not zapped and it will be found again in the hash table. Paolo