From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Subject: Re: [PATCH 21/23] KVM: PPC: Book3S PR: Use mmu_notifier_retry() in kvmppc_mmu_map_page() Date: Thu, 8 Aug 2013 22:06:28 +1000 Message-ID: <20130808120628.GA4865@iris.ozlabs.ibm.com> References: <20130806041259.GF19254@iris.ozlabs.ibm.com> <20130806042732.GA19254@iris.ozlabs.ibm.com> <6A3DF150A5B70D4F9B66A25E3F7C888D070FE0D4@039-SN2MPN1-012.039d.mgd.msft.net> <20130807082751.GB12112@iris.ozlabs.ibm.com> <6A3DF150A5B70D4F9B66A25E3F7C888D070FE64A@039-SN2MPN1-012.039d.mgd.msft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Graf , Benjamin Herrenschmidt , "kvm-ppc@vger.kernel.org" , "kvm@vger.kernel.org" To: Bhushan Bharat-R65777 Return-path: Content-Disposition: inline In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D070FE64A@039-SN2MPN1-012.039d.mgd.msft.net> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Wed, Aug 07, 2013 at 08:31:04AM +0000, Bhushan Bharat-R65777 wrote: > > > > -----Original Message----- > > From: Paul Mackerras [mailto:paulus@samba.org] > > Sent: Wednesday, August 07, 2013 1:58 PM > > To: Bhushan Bharat-R65777 > > Cc: Alexander Graf; Benjamin Herrenschmidt; kvm-ppc@vger.kernel.org; > > kvm@vger.kernel.org > > Subject: Re: [PATCH 21/23] KVM: PPC: Book3S PR: Use mmu_notifier_retry() in > > kvmppc_mmu_map_page() > > > > On Wed, Aug 07, 2013 at 05:17:29AM +0000, Bhushan Bharat-R65777 wrote: > > > > > > Pauls, I am trying to understand the flow; does retry mean that we do not > > create the mapping and return to guest, which will fault again and then we will > > retry? > > > > Yes, and you do put_page or kvm_release_pfn_clean for any page that you got. > > Ok, but what is the value to return back to guest when we know it is again going to generate fault. > Cannot we retry within KVM? You can, though you should make sure you include a preemption point. Going back to the guest gets you a preemption point because of the cond_resched() call in kvmppc_prepare_to_enter(). Paul.