Re: [Qemu-devel] [PATCH v2 03/19] spapr: introduce the XIVE interrupt sources

2017-12-20 Thread Cédric Le Goater
On 12/20/2017 08:54 AM, Cédric Le Goater wrote: > On 12/20/2017 06:22 AM, David Gibson wrote: >> On Sat, Dec 09, 2017 at 09:43:22AM +0100, Cédric Le Goater wrote: >>> Each XIVE interrupt source is associated with a two bit state machine >>> called an Event State Buffer (ESB) : the first bit "P"

Re: [Qemu-devel] [PATCH v2 03/19] spapr: introduce the XIVE interrupt sources

2017-12-19 Thread Cédric Le Goater
On 12/20/2017 06:22 AM, David Gibson wrote: > On Sat, Dec 09, 2017 at 09:43:22AM +0100, Cédric Le Goater wrote: >> Each XIVE interrupt source is associated with a two bit state machine >> called an Event State Buffer (ESB) : the first bit "P" means that an >> interrupt is "pending" and waiting for

Re: [Qemu-devel] [PATCH v2 03/19] spapr: introduce the XIVE interrupt sources

2017-12-19 Thread David Gibson
On Sat, Dec 09, 2017 at 09:43:22AM +0100, Cédric Le Goater wrote: > Each XIVE interrupt source is associated with a two bit state machine > called an Event State Buffer (ESB) : the first bit "P" means that an > interrupt is "pending" and waiting for an EOI and the bit "Q" (queued) > means a new

Re: [Qemu-devel] [PATCH v2 03/19] spapr: introduce the XIVE interrupt sources

2017-12-19 Thread David Gibson
On Tue, Dec 19, 2017 at 07:37:31AM +0100, Cédric Le Goater wrote: > On 12/18/2017 01:59 AM, Benjamin Herrenschmidt wrote: > > On Thu, 2017-12-14 at 16:24 +0100, Cédric Le Goater wrote: > >> The API between the source and the IVRE is extremely simple : > >> > >> static void

Re: [Qemu-devel] [PATCH v2 03/19] spapr: introduce the XIVE interrupt sources

2017-12-18 Thread Cédric Le Goater
On 12/18/2017 01:59 AM, Benjamin Herrenschmidt wrote: > On Thu, 2017-12-14 at 16:24 +0100, Cédric Le Goater wrote: >> The API between the source and the IVRE is extremely simple : >> >> static void spapr_xive_irq(sPAPRXive *xive, int lisn) >> >> The IVRE then scans its IVT, finds the EQ, and

Re: [Qemu-devel] [PATCH v2 03/19] spapr: introduce the XIVE interrupt sources

2017-12-17 Thread Benjamin Herrenschmidt
On Thu, 2017-12-14 at 16:24 +0100, Cédric Le Goater wrote: > The API between the source and the IVRE is extremely simple : > > static void spapr_xive_irq(sPAPRXive *xive, int lisn) > > The IVRE then scans its IVT, finds the EQ, and moves on to the > presenter. In HW it's an MMIO store

Re: [Qemu-devel] [PATCH v2 03/19] spapr: introduce the XIVE interrupt sources

2017-12-14 Thread Cédric Le Goater
> diff --git a/include/hw/ppc/spapr_xive.h b/include/hw/ppc/spapr_xive.h > index 5b1f78e06a1e..ecc15d889b74 100644 > --- a/include/hw/ppc/spapr_xive.h > +++ b/include/hw/ppc/spapr_xive.h > @@ -24,8 +24,17 @@ struct sPAPRXive { > /* Properties */ > uint32_t nr_irqs; > > +/* IRQ

[Qemu-devel] [PATCH v2 03/19] spapr: introduce the XIVE interrupt sources

2017-12-09 Thread Cédric Le Goater
Each XIVE interrupt source is associated with a two bit state machine called an Event State Buffer (ESB) : the first bit "P" means that an interrupt is "pending" and waiting for an EOI and the bit "Q" (queued) means a new interrupt was triggered while another was still pending. When an event is