[PATCH v2 2/4] kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit()
Scott Wood
scottwood at freescale.com
Sat May 11 08:43:57 EST 2013
On 05/10/2013 12:01:19 AM, Bhushan Bharat-R65777 wrote:
>
>
> > -----Original Message-----
> > From: kvm-ppc-owner at vger.kernel.org
> [mailto:kvm-ppc-owner at vger.kernel.org] On
> > Behalf Of Scott Wood
> > Sent: Friday, May 10, 2013 8:40 AM
> > To: Alexander Graf; Benjamin Herrenschmidt
> > Cc: kvm-ppc at vger.kernel.org; kvm at vger.kernel.org;
> linuxppc-dev at lists.ozlabs.org;
> > Wood Scott-B07421
> > Subject: [PATCH v2 2/4] kvm/ppc/booke64: Fix lazy ee handling in
> > kvmppc_handle_exit()
> >
> > EE is hard-disabled on entry to kvmppc_handle_exit(), so call
> > hard_irq_disable() so that PACA_IRQ_HARD_DIS is set, and
> soft_enabled
> > is unset.
> >
> > Without this, we get warnings such as
> arch/powerpc/kernel/time.c:300,
> > and sometimes host kernel hangs.
> >
> > Signed-off-by: Scott Wood <scottwood at freescale.com>
> > ---
> > arch/powerpc/kvm/booke.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> > index 1020119..705fc5c 100644
> > --- a/arch/powerpc/kvm/booke.c
> > +++ b/arch/powerpc/kvm/booke.c
> > @@ -833,6 +833,11 @@ int kvmppc_handle_exit(struct kvm_run *run,
> struct kvm_vcpu
> > *vcpu,
> > int r = RESUME_HOST;
> > int s;
> >
> > +#ifdef CONFIG_PPC64
> > + WARN_ON(local_paca->irq_happened != 0);
> > +#endif
> > + hard_irq_disable();
>
> It is not actually to hard disable as EE is already clear but to make
> it looks like hard_disable to host. Right?
> If so, should we write a comment here on why we are doing this?
Yes, I can add a comment.
-Scott
More information about the Linuxppc-dev
mailing list