diff options
author | Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> | 2010-11-19 04:01:40 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:29:43 -0500 |
commit | 30bfb3c4256422221cc763ff6e749ce8aca8e5c9 (patch) | |
tree | d3816bef1c74ce4d1acd6d80c634d50f7e60e644 /arch | |
parent | 27923eb19c5d1197bd9d1472abdc2e749f21387a (diff) |
KVM: MMU: fix forgot flush tlbs on sync_page path
We should flush all tlbs after drop spte on sync_page path since
Quote from Avi:
| sync_page
| drop_spte
| kvm_mmu_notifier_invalidate_page
| kvm_unmap_rmapp
| spte doesn't exist -> no flush
| page is freed
| guest can write into freed page?
KVM-Stable-Tag.
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/paging_tmpl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 590bf1223cb4..ca0e5e834724 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -786,6 +786,7 @@ static int FNAME(sync_page)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, | |||
786 | else | 786 | else |
787 | nonpresent = shadow_notrap_nonpresent_pte; | 787 | nonpresent = shadow_notrap_nonpresent_pte; |
788 | drop_spte(vcpu->kvm, &sp->spt[i], nonpresent); | 788 | drop_spte(vcpu->kvm, &sp->spt[i], nonpresent); |
789 | kvm_flush_remote_tlbs(vcpu->kvm); | ||
789 | continue; | 790 | continue; |
790 | } | 791 | } |
791 | 792 | ||