Re: [powerpc/nmi: RFC 2/2] Keep interrupts enabled even on soft disable

2016-12-15 Thread Benjamin Herrenschmidt
On Wed, 2016-12-14 at 11:41 +1100, Balbir Singh wrote: > I was planning to skipping other IRQ chips for now and support just > XICS/XIVE with BOOK3S and PPC64. But we can discuss this. Well you still need to make sure you don't do your lazy stuff on them and actually mask EE. > > That's why I men

Re: [powerpc/nmi: RFC 2/2] Keep interrupts enabled even on soft disable

2016-12-13 Thread Balbir Singh
On 14/12/16 02:27, Benjamin Herrenschmidt wrote: > On Tue, 2016-12-13 at 16:36 +1100, Balbir Singh wrote: >> Yep, although the code works for PPC_XICS only which is good for now. >> When we do XIVE, we can add more bits > > We may want to do XIVE differently, dunno. On XIVE we can just poke the

Re: [powerpc/nmi: RFC 2/2] Keep interrupts enabled even on soft disable

2016-12-13 Thread Benjamin Herrenschmidt
On Tue, 2016-12-13 at 16:36 +1100, Balbir Singh wrote: > Yep, although the code works for PPC_XICS only which is good for now. > When we do XIVE, we can add more bits We may want to do XIVE differently, dunno. On XIVE we can just poke the processor priority with a single MMIO store, so we don't ac

Re: [powerpc/nmi: RFC 2/2] Keep interrupts enabled even on soft disable

2016-12-13 Thread Benjamin Herrenschmidt
On Tue, 2016-12-13 at 14:28 +1100, Balbir Singh wrote: > > Also note that there's already a PACA field to "recover" an > > interrupt > > snatched by KVM, though it's XICS specific, while your approach is > > more > > generic, you may want to merge the two. Talk to Paulus. > > > > That is specific

Re: [powerpc/nmi: RFC 2/2] Keep interrupts enabled even on soft disable

2016-12-12 Thread Nicholas Piggin
On Tue, 13 Dec 2016 16:36:11 +1100 Balbir Singh wrote: > On Mon, 2016-12-12 at 23:31 +1000, Nicholas Piggin wrote: > > On Mon, 12 Dec 2016 20:50:03 +1100 > > Balbir Singh wrote: > >  > > > This patch removes the disabling of interrupts > > > in soft-disable mode, when interrupts are received >

Re: [powerpc/nmi: RFC 2/2] Keep interrupts enabled even on soft disable

2016-12-12 Thread Balbir Singh
On Mon, 2016-12-12 at 23:31 +1000, Nicholas Piggin wrote: > On Mon, 12 Dec 2016 20:50:03 +1100 > Balbir Singh wrote: >  > > This patch removes the disabling of interrupts > > in soft-disable mode, when interrupts are received > > (in lazy mode). The new scheme keeps the interrupts > > enabled when

Re: [powerpc/nmi: RFC 2/2] Keep interrupts enabled even on soft disable

2016-12-12 Thread Balbir Singh
On Mon, 2016-12-12 at 09:24 -0600, Benjamin Herrenschmidt wrote: > On Mon, 2016-12-12 at 23:31 +1000, Nicholas Piggin wrote: > > Otherwise, this looks nice if it does the right thing with the > > interrupt > > controller. It hasn't taken a lot of lines to implement which is > > very > > cool. >  >

Re: [powerpc/nmi: RFC 2/2] Keep interrupts enabled even on soft disable

2016-12-12 Thread Benjamin Herrenschmidt
On Mon, 2016-12-12 at 23:31 +1000, Nicholas Piggin wrote: > Otherwise, this looks nice if it does the right thing with the interrupt > controller. It hasn't taken a lot of lines to implement which is very > cool. We might want to be a bit careful. It will work with XICS fine, but it might be trick

Re: [powerpc/nmi: RFC 2/2] Keep interrupts enabled even on soft disable

2016-12-12 Thread Nicholas Piggin
On Mon, 12 Dec 2016 20:50:03 +1100 Balbir Singh wrote: > This patch removes the disabling of interrupts > in soft-disable mode, when interrupts are received > (in lazy mode). The new scheme keeps the interrupts > enabled when we receive an interrupt and does the > following > > a. On decrementer

[powerpc/nmi: RFC 2/2] Keep interrupts enabled even on soft disable

2016-12-12 Thread Balbir Singh
This patch removes the disabling of interrupts in soft-disable mode, when interrupts are received (in lazy mode). The new scheme keeps the interrupts enabled when we receive an interrupt and does the following a. On decrementer interrupt, instead of setting dec to maximum and returning, we do the