Re: [PATCH 24/37] KVM: PPC: booke: rework rescheduling checks

2012-02-28 Thread Scott Wood
On 02/28/2012 05:03 AM, Alexander Graf wrote: > > On 27.02.2012, at 20:28, Scott Wood wrote: > >> If there is a signal pending and MSR[WE] is set, we'll loop forever >> without reaching this check. > > Good point. How about something like this on top (will fold in later)? > > diff --git a/arch/

Re: [PATCH 24/37] KVM: PPC: booke: rework rescheduling checks

2012-02-28 Thread Alexander Graf
On 27.02.2012, at 20:28, Scott Wood wrote: > On 02/24/2012 08:26 AM, Alexander Graf wrote: >> -void kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) >> +int kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) >> { >> unsigned long *pending = &vcpu->arch.pending_exceptions; >> unsigne

Re: [PATCH 24/37] KVM: PPC: booke: rework rescheduling checks

2012-02-27 Thread Scott Wood
On 02/24/2012 08:26 AM, Alexander Graf wrote: > -void kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) > +int kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) > { > unsigned long *pending = &vcpu->arch.pending_exceptions; > unsigned long old_pending = vcpu->arch.pending_exception

RE: [PATCH 24/37] KVM: PPC: booke: rework rescheduling checks

2012-02-27 Thread Bhushan Bharat-R65777
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Monday, February 27, 2012 11:53 PM > To: Bhushan Bharat-R65777 > Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; > linuxppc-...@lists.ozlabs.org; > Wood Scott-B07421 > Subject: Re: [PATC

Re: [PATCH 24/37] KVM: PPC: booke: rework rescheduling checks

2012-02-27 Thread Alexander Graf
On 02/27/2012 06:33 PM, Alexander Graf wrote: 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

Re: [PATCH 24/37] KVM: PPC: booke: rework rescheduling checks

2012-02-27 Thread Alexander Graf
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_sign

RE: [PATCH 24/37] KVM: PPC: booke: rework rescheduling checks

2012-02-27 Thread Bhushan Bharat-R65777
421 > Subject: [PATCH 24/37] KVM: PPC: booke: rework rescheduling checks > > Instead of checking whether we should reschedule only when we exited due to an > interrupt, let's always check before entering the guest back again. This gets > the target more in line with the other

[PATCH 24/37] KVM: PPC: booke: rework rescheduling checks

2012-02-24 Thread Alexander Graf
Instead of checking whether we should reschedule only when we exited due to an interrupt, let's always check before entering the guest back again. This gets the target more in line with the other archs. Also while at it, generalize the whole thing so that eventually we could have a single kvmppc_p