Re: [PATCH v5 1/9] KVM: MMU: fix forgot reserved bits check in speculative path

2010-07-12 Thread Xiao Guangrong
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 =

Re: [PATCH v5 1/9] KVM: MMU: fix forgot reserved bits check in speculative path

2010-07-12 Thread Avi Kivity
On 07/12/2010 05:37 AM, Xiao Guangrong wrote: +if (is_rsvd_bits_set(vcpu, gentry, PT_PAGE_TABLE_LEVEL)) +gentry = 0; + That only works if the gpte is for the same mode as the current vcpu mmu mode. In some cases it is too strict (vcpu in pae mode writing a 32-bit gpte),

Re: [PATCH v5 1/9] KVM: MMU: fix forgot reserved bits check in speculative path

2010-07-11 Thread Xiao Guangrong
Avi Kivity wrote: >> +if (is_rsvd_bits_set(vcpu, gentry, PT_PAGE_TABLE_LEVEL)) >> +gentry = 0; >> + >> > > That only works if the gpte is for the same mode as the current vcpu mmu > mode. In some cases it is too strict (vcpu in pae mode writing a 32-bit > gpte), which is not to

Re: [PATCH v5 1/9] KVM: MMU: fix forgot reserved bits check in speculative path

2010-07-11 Thread Avi Kivity
On 07/06/2010 01:44 PM, Xiao Guangrong wrote: In the speculative path, we should check guest pte's reserved bits just as the real processor does Reported-by: Marcelo Tosatti Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c |3 +++ arch/x86/kvm/paging_tmpl.h |3 ++- 2 file

[PATCH v5 1/9] KVM: MMU: fix forgot reserved bits check in speculative path

2010-07-06 Thread Xiao Guangrong
In the speculative path, we should check guest pte's reserved bits just as the real processor does Reported-by: Marcelo Tosatti Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c |3 +++ arch/x86/kvm/paging_tmpl.h |3 ++- 2 files changed, 5 insertions(+), 1 deletions(-) diff