From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [patch 4/5] KVM: MMU: reload request from GET_DIRTY_LOG path Date: Tue, 1 Jul 2014 14:50:10 -0300 Message-ID: <20140701175010.GA10927@amt.cnet> References: <20140618231203.846608908@amt.cnet> <20140618231521.718959400@amt.cnet> <20140619081719.GD10948@minantech.com> <20140619184031.GC32410@amt.cnet> <20140620104610.GD20764@minantech.com> <20140630205902.GB26566@amt.cnet> <20140701062719.GK18167@minantech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, ak@linux.intel.com, pbonzini@redhat.com, xiaoguangrong@linux.vnet.ibm.com, avi@cloudius-systems.com To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11505 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756327AbaGARuf (ORCPT ); Tue, 1 Jul 2014 13:50:35 -0400 Content-Disposition: inline In-Reply-To: <20140701062719.GK18167@minantech.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Jul 01, 2014 at 09:27:19AM +0300, Gleb Natapov wrote: > > The vcpu will never see a read-only spte because the VM-exit (due to > > IPI) guarantees vcpu is outside of guest mode _before_ it is write > > protected. > Right. Now I see why you absolutely have to send IPI in mmu_reload_pinned_vcpus() > before marking pte as read only. And kvm->mmu_lock is what will prevent vcpu from > re-entering guest mode again before pte is marked read only, right? Yes. > > So i ask you: do you still hold the "current approach should be > > improved" position ? > > > As I said IMO what I proposed is much simpler and not as tricky as what you have here. > It also has an advantage of not slowing down next guest entry after GET_DIRTY_LOG because > it does not require mmu reload and page_faulting in pinned pages. Ok sure.