Subject: Re: [PATCH] KVM: PPC: Book3E 64: Fix IRQs warnings and hangs

From: Scott Wood <[email-masked]>
Date: Fri, 3 May 2013 18:30:46 -0500

On 05/03/2013 05:59:32 PM, Caraman Mihai Claudiu-B02008 wrote:
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Saturday, May 04, 2013 1:07 AM
> > To: Caraman Mihai Claudiu-B02008
> > Cc: Wood Scott-B07421; [email-masked]; [email-masked];
> > [email-masked]
> > Subject: Re: [PATCH] KVM: PPC: Book3E 64: Fix IRQs warnings and =20
> hangs
> >
> > I replaced the two calls to kvmppc_lazy_ee_enable() with calls to
> > hard_irq_disable(), and it seems to be working fine.
>=20
> Please take a look on 'KVM: PPC64: booke: Hard disable interrupts when
> entering guest' RFC thread and see if your solution addresses Ben's
> comments.

My original one didn't (there was a race if an interrupt comes in =20
between soft-disabling and hard-disabling, it wouldn't be received =20
until the guest exits for some other reason).

Instead, I turned the local_irq_disable() into hard_irq_disable() plus =20
trace_hardirqs_off().  This worked without warnings.

-Scott=