Re: [Qemu-devel] [PATCH v3 1/3] spapr: introduce a fixed IRQ number space

2018-07-06 Thread Cédric Le Goater
On 07/06/2018 07:44 AM, David Gibson wrote: > On Tue, Jul 03, 2018 at 05:19:56PM +0200, Cédric Le Goater wrote: >> On 07/02/2018 01:11 PM, Cédric Le Goater wrote: >>> On 07/02/2018 12:03 PM, Cédric Le Goater wrote: > --- a/hw/ppc/spapr_vio.c > +++ b/hw/ppc/spapr_vio.c > @@ -436,6 +436,9

Re: [Qemu-devel] [PATCH v3 1/3] spapr: introduce a fixed IRQ number space

2018-07-05 Thread Cédric Le Goater
On 07/06/2018 07:44 AM, David Gibson wrote: > On Tue, Jul 03, 2018 at 05:19:56PM +0200, Cédric Le Goater wrote: >> On 07/02/2018 01:11 PM, Cédric Le Goater wrote: >>> On 07/02/2018 12:03 PM, Cédric Le Goater wrote: > --- a/hw/ppc/spapr_vio.c > +++ b/hw/ppc/spapr_vio.c > @@ -436,6 +436,9

Re: [Qemu-devel] [PATCH v3 1/3] spapr: introduce a fixed IRQ number space

2018-07-05 Thread David Gibson
On Tue, Jul 03, 2018 at 05:19:56PM +0200, Cédric Le Goater wrote: > On 07/02/2018 01:11 PM, Cédric Le Goater wrote: > > On 07/02/2018 12:03 PM, Cédric Le Goater wrote: > >>> --- a/hw/ppc/spapr_vio.c > >>> +++ b/hw/ppc/spapr_vio.c > >>> @@ -436,6 +436,9 @@ static void spapr_vio_busdev_reset(DeviceSt

Re: [Qemu-devel] [PATCH v3 1/3] spapr: introduce a fixed IRQ number space

2018-07-04 Thread Greg Kurz
On Tue, 3 Jul 2018 17:19:56 +0200 Cédric Le Goater wrote: > On 07/02/2018 01:11 PM, Cédric Le Goater wrote: > > On 07/02/2018 12:03 PM, Cédric Le Goater wrote: > >>> --- a/hw/ppc/spapr_vio.c > >>> +++ b/hw/ppc/spapr_vio.c > >>> @@ -436,6 +436,9 @@ static void spapr_vio_busdev_reset(DeviceState

Re: [Qemu-devel] [PATCH v3 1/3] spapr: introduce a fixed IRQ number space

2018-07-03 Thread Cédric Le Goater
On 07/02/2018 01:11 PM, Cédric Le Goater wrote: > On 07/02/2018 12:03 PM, Cédric Le Goater wrote: >>> --- a/hw/ppc/spapr_vio.c >>> +++ b/hw/ppc/spapr_vio.c >>> @@ -436,6 +436,9 @@ static void spapr_vio_busdev_reset(DeviceState *qdev) >>> } >>> } >>> >>> +/* TODO : poor VIO device indexing .

Re: [Qemu-devel] [PATCH v3 1/3] spapr: introduce a fixed IRQ number space

2018-07-02 Thread Cédric Le Goater
On 07/02/2018 12:03 PM, Cédric Le Goater wrote: >> --- a/hw/ppc/spapr_vio.c >> +++ b/hw/ppc/spapr_vio.c >> @@ -436,6 +436,9 @@ static void spapr_vio_busdev_reset(DeviceState *qdev) >> } >> } >> >> +/* TODO : poor VIO device indexing ... */ >> +static uint32_t vio_index; > > I think we coul

Re: [Qemu-devel] [PATCH v3 1/3] spapr: introduce a fixed IRQ number space

2018-07-02 Thread Cédric Le Goater
> --- a/hw/ppc/spapr_vio.c > +++ b/hw/ppc/spapr_vio.c > @@ -436,6 +436,9 @@ static void spapr_vio_busdev_reset(DeviceState *qdev) > } > } > > +/* TODO : poor VIO device indexing ... */ > +static uint32_t vio_index; I think we could also use (dev->reg & 0xff) as an index for the VIO device

[Qemu-devel] [PATCH v3 1/3] spapr: introduce a fixed IRQ number space

2018-06-19 Thread Cédric Le Goater
This proposal introduces a new IRQ number space layout using static numbers for all devices and a bitmap allocator for the MSI IRQ numbers which are negotiated by the guest at runtime. The previous layout is kept in pre-3.0 machines raising the 'legacy_irq_allocation' machine class flag. Signed-o