On Mon, Nov 22, 2010 at 11:45:18AM +0800, Xiao Guangrong wrote:
On 11/20/2010 12:11 AM, Marcelo Tosatti wrote:
void kvm_flush_remote_tlbs(struct kvm *kvm)
{
+ int dirty_count = atomic_read(kvm-tlbs_dirty);
+
+ smp_mb();
if (make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH))
On Mon, Nov 22, 2010 at 12:19:25PM -0200, Marcelo Tosatti wrote:
On Mon, Nov 22, 2010 at 11:45:18AM +0800, Xiao Guangrong wrote:
On 11/20/2010 12:11 AM, Marcelo Tosatti wrote:
void kvm_flush_remote_tlbs(struct kvm *kvm)
{
+int dirty_count = atomic_read(kvm-tlbs_dirty);
On 11/20/2010 12:11 AM, Marcelo Tosatti wrote:
void kvm_flush_remote_tlbs(struct kvm *kvm)
{
+int dirty_count = atomic_read(kvm-tlbs_dirty);
+
+smp_mb();
if (make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH))
++kvm-stat.remote_tlb_flush;
+
Quote from Avi:
| I don't think we need to flush immediately; set a tlb dirty bit somewhere
| that is cleareded when we flush the tlb. kvm_mmu_notifier_invalidate_page()
| can consult the bit and force a flush if set.
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
---
On Fri, Nov 19, 2010 at 05:05:38PM +0800, Xiao Guangrong wrote:
Quote from Avi:
| I don't think we need to flush immediately; set a tlb dirty bit somewhere
| that is cleareded when we flush the tlb. kvm_mmu_notifier_invalidate_page()
| can consult the bit and force a flush if set.