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/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c > index 430055e..9f27258 100644 > --- a/arch/powerpc/kvm/booke.c > +++ b/arch/powerpc/kvm/booke.c > @@ -477,15 +477,17 @@ static int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) > continue; > } > > + if (signal_pending(current)) { > + r = 1; > + break; > + } > + > if (kvmppc_core_prepare_to_enter(vcpu)) { > /* interrupts got enabled in between, so we > are back at square 1 */ > continue; > } > > - if (signal_pending(current)) > - r = 1; > - > break; > } Looks OK. -Scott -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html