[PATCH] KVM: PPC: Book3E 64: Fix IRQs warnings and hangs
Caraman Mihai Claudiu-B02008
B02008 at freescale.com
Sat May 4 06:56:47 EST 2013
> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Friday, May 03, 2013 11:15 PM
> To: Caraman Mihai Claudiu-B02008
> Cc: Wood Scott-B07421; kvm-ppc at vger.kernel.org; kvm at vger.kernel.org;
> linuxppc-dev at lists.ozlabs.org
> Subject: Re: [PATCH] KVM: PPC: Book3E 64: Fix IRQs warnings and hangs
> > > > The unresponsiveness has to do with the fact that
> > > > arch_local_irq_restore()
> > > > does not guarantees to hard enable interrupts.
> > >
> > > Could you elaborate? If the saved IRQ state was "enabled", why
> > > wouldn't arch_local_irq_restore() hard-enable IRQs? The last thing
> > it
> > > does is __hard_irq_enable().
> > if (!irq_happened)
> > return;
> OK, so the problem is that we're not setting PACA_IRQ_HARD_DIS when we
> hard-disable interrupts?
We enter guest with local_irq_disable() which means soft disabled, when
do we hard-disable interrupts? If we follow host exception handlers model
they set PACA_IRQ_EE/DEC/DBELL but not PACA_IRQ_HARD_DIS. Can you give it
a try to see how KVM behaves with PACA_IRQ_HARD_DIS? I can't do it right now.
> > > Where is the arch_local_irq_restore() instance you're talking about?
> > ./arch/power/kernel/irq.c
> I meant the caller. :-P
55static inline unsigned long arch_local_irq_disable(void)
57 unsigned long flags, zero;
59 asm volatile(
60 "li %1,0; lbz %0,%2(13); stb %1,%2(13)"
61 : "=r" (flags), "=&r" (zero)
62 : "i" (offsetof(struct paca_struct, soft_enabled))
63 : "memory");
65 return flags;
68extern void arch_local_irq_restore(unsigned long);
70static inline void arch_local_irq_enable(void)
More information about the Linuxppc-dev