From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Date: Mon, 27 Feb 2012 17:33:09 +0000 Subject: Re: [PATCH 24/37] KVM: PPC: booke: rework rescheduling checks Message-Id: <4F4BBE55.6020204@suse.de> List-Id: References: <1330093591-19523-1-git-send-email-agraf@suse.de> <1330093591-19523-25-git-send-email-agraf@suse.de> <6A3DF150A5B70D4F9B66A25E3F7C888D141083@039-SN2MPN1-023.039d.mgd.msft.net> In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D141083@039-SN2MPN1-023.039d.mgd.msft.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Bhushan Bharat-R65777 Cc: "kvm-ppc@vger.kernel.org" , "kvm@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , Wood Scott-B07421 On 02/27/2012 05:34 PM, Bhushan Bharat-R65777 wrote: > >> +} >> + >> +/* >> + * Common checks before entering the guest world. Call with interrupts >> + * disabled. >> + * >> + * returns !0 if a signal is pending and check_signal is true */ >> +static int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu, bool >> +check_signal) { >> + int r = 0; >> + >> + WARN_ON_ONCE(!irqs_disabled()); >> + while (true) { >> + if (need_resched()) { >> + local_irq_enable(); >> + cond_resched(); >> + local_irq_disable(); >> + continue; >> + } >> + >> + if (kvmppc_core_prepare_to_enter(vcpu)) { > kvmppc_prepare_to_enter() is called even on heavyweight_exit. Should not this be called only on lightweight_exit? Yeah, we don't need to call it when exiting anyways. That's a functional change though, which this patch is trying not to introduce. So we should rather do that as a patch on top. Alex