linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/6] KVM: MMU: fix forgot flush tlbs on sync_page path
@ 2010-11-19  9:01 Xiao Guangrong
  2010-11-19  9:02 ` [PATCH v3 2/6] KVM: MMU: don't drop spte if overwrite it from W to RO Xiao Guangrong
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Xiao Guangrong @ 2010-11-19  9:01 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Marcelo Tosatti, KVM, LKML

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? 

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
---
 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 590bf12..ca0e5e8 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,
 			else
 				nonpresent = shadow_notrap_nonpresent_pte;
 			drop_spte(vcpu->kvm, &sp->spt[i], nonpresent);
+			kvm_flush_remote_tlbs(vcpu->kvm);
 			continue;
 		}
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-11-26 14:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19  9:01 [PATCH v3 1/6] KVM: MMU: fix forgot flush tlbs on sync_page path Xiao Guangrong
2010-11-19  9:02 ` [PATCH v3 2/6] KVM: MMU: don't drop spte if overwrite it from W to RO Xiao Guangrong
2010-11-19  9:03 ` [PATCH v3 3/6] KVM: MMU: rename 'reset_host_protection' to 'host_writable' Xiao Guangrong
2010-11-19  9:04 ` [PATCH v3 4/6] KVM: MMU: remove 'clear_unsync' parameter Xiao Guangrong
2010-11-19  9:04 ` [PATCH v3 5/6] KVM: MMU: abstract invalid guest pte mapping Xiao Guangrong
2010-11-22  9:28   ` Avi Kivity
2010-11-22 10:18     ` Xiao Guangrong
2010-11-22 10:17       ` Avi Kivity
2010-11-23  3:08     ` Xiao Guangrong
2010-11-19  9:05 ` [PATCH v3 6/6] KVM: MMU: delay flush all tlbs on sync_page path Xiao Guangrong
2010-11-19 16:11   ` Marcelo Tosatti
2010-11-22  3:45     ` Xiao Guangrong
2010-11-22 14:19       ` Marcelo Tosatti
2010-11-22 21:46         ` Marcelo Tosatti
2010-11-23  3:13           ` Xiao Guangrong
2010-11-26  1:37 ` [PATCH v3 1/6] KVM: MMU: fix forgot flush " Xiao Guangrong
2010-11-26 14:29   ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).