Re: [Qemu-devel] [RFC PATCH v2 07/21] ppc/xive: add MMIO handlers for the XIVE interrupt sources

2017-09-28 Thread Benjamin Herrenschmidt
On Wed, 2017-09-20 at 15:05 +0200, Cédric Le Goater wrote: > > > +/* > > > + * XIVE Interrupt Source MMIOs > > > + */ > > > +static uint64_t spapr_xive_esb_read(void *opaque, hwaddr addr, unsigned > > > size) > > > +{ > > > +sPAPRXive *xive = SPAPR_XIVE(opaque); > > > +uint32_t offset =

Re: [Qemu-devel] [RFC PATCH v2 07/21] ppc/xive: add MMIO handlers for the XIVE interrupt sources

2017-09-28 Thread Benjamin Herrenschmidt
On Wed, 2017-09-20 at 14:54 +0200, Cédric Le Goater wrote: > On 09/19/2017 04:57 AM, David Gibson wrote: > > On Mon, Sep 11, 2017 at 07:12:21PM +0200, Cédric Le Goater wrote: > > > Each interrupt source is associated with a two bit state machine > > > called an Event State Buffer (ESB) which is

Re: [Qemu-devel] [RFC PATCH v2 07/21] ppc/xive: add MMIO handlers for the XIVE interrupt sources

2017-09-22 Thread Cédric Le Goater
On 09/22/2017 12:58 PM, David Gibson wrote: > On Wed, Sep 20, 2017 at 02:54:31PM +0200, Cédric Le Goater wrote: >> On 09/19/2017 04:57 AM, David Gibson wrote: >>> On Mon, Sep 11, 2017 at 07:12:21PM +0200, Cédric Le Goater wrote: Each interrupt source is associated with a two bit state machine

Re: [Qemu-devel] [RFC PATCH v2 07/21] ppc/xive: add MMIO handlers for the XIVE interrupt sources

2017-09-22 Thread David Gibson
On Wed, Sep 20, 2017 at 02:54:31PM +0200, Cédric Le Goater wrote: > On 09/19/2017 04:57 AM, David Gibson wrote: > > On Mon, Sep 11, 2017 at 07:12:21PM +0200, Cédric Le Goater wrote: > >> Each interrupt source is associated with a two bit state machine > >> called an Event State Buffer (ESB) which

Re: [Qemu-devel] [RFC PATCH v2 07/21] ppc/xive: add MMIO handlers for the XIVE interrupt sources

2017-09-20 Thread Cédric Le Goater
On 09/19/2017 04:57 AM, David Gibson wrote: > On Mon, Sep 11, 2017 at 07:12:21PM +0200, Cédric Le Goater wrote: >> Each interrupt source is associated with a two bit state machine >> called an Event State Buffer (ESB) which is controlled by MMIO to >> trigger events. See code for more details on

Re: [Qemu-devel] [RFC PATCH v2 07/21] ppc/xive: add MMIO handlers for the XIVE interrupt sources

2017-09-20 Thread Cédric Le Goater
>> +/* >> + * XIVE Interrupt Source MMIOs >> + */ >> +static uint64_t spapr_xive_esb_read(void *opaque, hwaddr addr, unsigned >> size) >> +{ >> +sPAPRXive *xive = SPAPR_XIVE(opaque); >> +uint32_t offset = addr & 0xF00; >> +uint32_t srcno = addr >> xive->esb_shift; >> +XiveIVE

Re: [Qemu-devel] [RFC PATCH v2 07/21] ppc/xive: add MMIO handlers for the XIVE interrupt sources

2017-09-19 Thread David Gibson
On Mon, Sep 11, 2017 at 07:12:21PM +0200, Cédric Le Goater wrote: > Each interrupt source is associated with a two bit state machine > called an Event State Buffer (ESB) which is controlled by MMIO to > trigger events. See code for more details on the states and > transitions. > > The MMIO space

[Qemu-devel] [RFC PATCH v2 07/21] ppc/xive: add MMIO handlers for the XIVE interrupt sources

2017-09-11 Thread Cédric Le Goater
Each interrupt source is associated with a two bit state machine called an Event State Buffer (ESB) which is controlled by MMIO to trigger events. See code for more details on the states and transitions. The MMIO space for the ESB translation is 512GB large on baremetal (powernv) systems and the