From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takuya Yoshikawa Subject: Re: [PATCH v2 2/5] KVM: MMU: Convert remote flushes to kvm_mark_tlb_dirty() and a conditional flush Date: Tue, 22 May 2012 23:46:47 +0900 Message-ID: <20120522234647.24a040cb1b8a6466e50445c7@gmail.com> References: <1337250284-18607-1-git-send-email-avi@redhat.com> <1337250284-18607-2-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , Xiao Guangrong , Takuya Yoshikawa , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mail-pb0-f46.google.com ([209.85.160.46]:53504 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757620Ab2EVOqw (ORCPT ); Tue, 22 May 2012 10:46:52 -0400 Received: by pbbrp8 with SMTP id rp8so8482482pbb.19 for ; Tue, 22 May 2012 07:46:52 -0700 (PDT) In-Reply-To: <1337250284-18607-2-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 17 May 2012 13:24:41 +0300 Avi Kivity wrote: > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 2256f51..a2149d8 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -3130,7 +3130,9 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log) > kvm_mmu_write_protect_pt_masked(kvm, memslot, offset, mask); > } > if (is_dirty) > - kvm_flush_remote_tlbs(kvm); > + kvm_mark_tlb_dirty(kvm); > + > + kvm_cond_flush_remote_tlbs(kvm); > > spin_unlock(&kvm->mmu_lock); Any reason not to move this flush outside of the mmu_lock in this patch series? Unlike other rmap write protections, this one seems to be simple. Takuya