From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH v5 1/9] KVM: MMU: fix forgot reserved bits check in speculative path Date: Tue, 13 Jul 2010 09:57:09 +0800 Message-ID: <4C3BC7F5.80602@cn.fujitsu.com> References: <4C330918.6040709@cn.fujitsu.com> <4C39B81A.5080000@redhat.com> <4C3A7FEA.6030205@cn.fujitsu.com> <4C3B1554.7000005@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , LKML , KVM list To: Avi Kivity Return-path: In-Reply-To: <4C3B1554.7000005@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Avi Kivity wrote: >> >> How about only update the shadow page which has the same pae set with >> the written >> vcpu? Just like this: >> >> @@ -3000,6 +3000,10 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, >> gpa_t gpa, >> while (npte--) { >> entry = *spte; >> mmu_pte_write_zap_pte(vcpu, sp, spte); >> + >> + if (!!is_pae(vcpu) != sp->role.cr4_pae) >> + continue; >> + >> > > Not enough, one vcpu can have nx set while the other has it reset, etc. > Yeah, so we also need check sp->role.nxe here