Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-05-04 Thread Cédric Le Goater
On 05/04/2018 08:35 AM, David Gibson wrote: > On Thu, May 03, 2018 at 10:43:47AM +0200, Cédric Le Goater wrote: >> On 05/03/2018 04:29 AM, David Gibson wrote: >>> On Thu, Apr 26, 2018 at 10:17:13AM +0200, Cédric Le Goater wrote: On 04/26/2018 07:36 AM, David Gibson wrote: > On Thu, Apr

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-05-04 Thread David Gibson
On Thu, May 03, 2018 at 10:43:47AM +0200, Cédric Le Goater wrote: > On 05/03/2018 04:29 AM, David Gibson wrote: > > On Thu, Apr 26, 2018 at 10:17:13AM +0200, Cédric Le Goater wrote: > >> On 04/26/2018 07:36 AM, David Gibson wrote: > >>> On Thu, Apr 19, 2018 at 07:40:09PM +0200, Cédric Le Goater

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-05-03 Thread Cédric Le Goater
On 05/03/2018 04:29 AM, David Gibson wrote: > On Thu, Apr 26, 2018 at 10:17:13AM +0200, Cédric Le Goater wrote: >> On 04/26/2018 07:36 AM, David Gibson wrote: >>> On Thu, Apr 19, 2018 at 07:40:09PM +0200, Cédric Le Goater wrote: On 04/16/2018 06:26 AM, David Gibson wrote: > On Thu, Apr

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-05-02 Thread David Gibson
On Thu, Apr 26, 2018 at 10:17:13AM +0200, Cédric Le Goater wrote: > On 04/26/2018 07:36 AM, David Gibson wrote: > > On Thu, Apr 19, 2018 at 07:40:09PM +0200, Cédric Le Goater wrote: > >> On 04/16/2018 06:26 AM, David Gibson wrote: > >>> On Thu, Apr 12, 2018 at 10:18:11AM +0200, Cédric Le Goater

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-26 Thread Cédric Le Goater
On 04/26/2018 07:36 AM, David Gibson wrote: > On Thu, Apr 19, 2018 at 07:40:09PM +0200, Cédric Le Goater wrote: >> On 04/16/2018 06:26 AM, David Gibson wrote: >>> On Thu, Apr 12, 2018 at 10:18:11AM +0200, Cédric Le Goater wrote: On 04/12/2018 07:07 AM, David Gibson wrote: > On Wed, Dec

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-25 Thread David Gibson
On Thu, Apr 19, 2018 at 07:40:09PM +0200, Cédric Le Goater wrote: > On 04/16/2018 06:26 AM, David Gibson wrote: > > On Thu, Apr 12, 2018 at 10:18:11AM +0200, Cédric Le Goater wrote: > >> On 04/12/2018 07:07 AM, David Gibson wrote: > >>> On Wed, Dec 20, 2017 at 08:38:41AM +0100, Cédric Le Goater

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-19 Thread Cédric Le Goater
On 04/16/2018 06:26 AM, David Gibson wrote: > On Thu, Apr 12, 2018 at 10:18:11AM +0200, Cédric Le Goater wrote: >> On 04/12/2018 07:07 AM, David Gibson wrote: >>> On Wed, Dec 20, 2017 at 08:38:41AM +0100, Cédric Le Goater wrote: On 12/20/2017 06:09 AM, David Gibson wrote: > On Sat, Dec

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-19 Thread Cédric Le Goater
On 04/16/2018 06:29 AM, David Gibson wrote: > On Thu, Apr 12, 2018 at 10:36:10AM +0200, Cédric Le Goater wrote: >> On 04/12/2018 07:16 AM, David Gibson wrote: >>> On Mon, Feb 12, 2018 at 09:55:17AM +1100, Benjamin Herrenschmidt wrote: On Sun, 2018-02-11 at 19:08 +1100, David Gibson wrote:

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-15 Thread David Gibson
On Thu, Apr 12, 2018 at 10:36:10AM +0200, Cédric Le Goater wrote: > On 04/12/2018 07:16 AM, David Gibson wrote: > > On Mon, Feb 12, 2018 at 09:55:17AM +1100, Benjamin Herrenschmidt wrote: > >> On Sun, 2018-02-11 at 19:08 +1100, David Gibson wrote: > >>> On Thu, Jan 18, 2018 at 08:27:52AM +1100,

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-15 Thread David Gibson
On Thu, Apr 12, 2018 at 10:18:11AM +0200, Cédric Le Goater wrote: > On 04/12/2018 07:07 AM, David Gibson wrote: > > On Wed, Dec 20, 2017 at 08:38:41AM +0100, Cédric Le Goater wrote: > >> On 12/20/2017 06:09 AM, David Gibson wrote: > >>> On Sat, Dec 09, 2017 at 09:43:21AM +0100, Cédric Le Goater

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-12 Thread Cédric Le Goater
On 04/12/2018 07:15 AM, David Gibson wrote: > On Wed, Jan 17, 2018 at 03:39:46PM +0100, Cédric Le Goater wrote: >> On 01/17/2018 12:10 PM, Benjamin Herrenschmidt wrote: >>> On Wed, 2018-01-17 at 10:18 +0100, Cédric Le Goater wrote: >>> Also, have we decided how the process of switching between

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-12 Thread Cédric Le Goater
On 04/12/2018 07:10 AM, David Gibson wrote: > On Wed, Jan 17, 2018 at 10:18:43AM +0100, Cédric Le Goater wrote: > Also, have we decided how the process of switching between XICS and > XIVE will work vs. CAS ? That's how it is described in the architecture. The current choice is

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-12 Thread Cédric Le Goater
On 04/12/2018 07:16 AM, David Gibson wrote: > On Mon, Feb 12, 2018 at 09:55:17AM +1100, Benjamin Herrenschmidt wrote: >> On Sun, 2018-02-11 at 19:08 +1100, David Gibson wrote: >>> On Thu, Jan 18, 2018 at 08:27:52AM +1100, Benjamin Herrenschmidt wrote: On Wed, 2018-01-17 at 15:39 +0100, Cédric

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-12 Thread Cédric Le Goater
On 04/12/2018 07:08 AM, David Gibson wrote: > On Thu, Dec 21, 2017 at 11:12:06AM +1100, Benjamin Herrenschmidt wrote: >> On Wed, 2017-12-20 at 16:09 +1100, David Gibson wrote: >>> >>> As you've suggested in yourself, I think we might need to more >>> explicitly model the different components of

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-12 Thread Cédric Le Goater
On 04/12/2018 07:07 AM, David Gibson wrote: > On Wed, Dec 20, 2017 at 08:38:41AM +0100, Cédric Le Goater wrote: >> On 12/20/2017 06:09 AM, David Gibson wrote: >>> On Sat, Dec 09, 2017 at 09:43:21AM +0100, Cédric Le Goater wrote: With the POWER9 processor comes a new interrupt controller

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-11 Thread David Gibson
On Wed, Jan 17, 2018 at 10:18:43AM +0100, Cédric Le Goater wrote: > >>> Also, have we decided how the process of switching between XICS and > >>> XIVE will work vs. CAS ? > >> > >> That's how it is described in the architecture. The current choice is > >> to create both XICS and XIVE objects and

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-11 Thread David Gibson
On Mon, Feb 12, 2018 at 09:55:17AM +1100, Benjamin Herrenschmidt wrote: > On Sun, 2018-02-11 at 19:08 +1100, David Gibson wrote: > > On Thu, Jan 18, 2018 at 08:27:52AM +1100, Benjamin Herrenschmidt wrote: > > > On Wed, 2018-01-17 at 15:39 +0100, Cédric Le Goater wrote: > > > > Migration is a

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-11 Thread David Gibson
On Wed, Dec 20, 2017 at 08:38:41AM +0100, Cédric Le Goater wrote: > On 12/20/2017 06:09 AM, David Gibson wrote: > > On Sat, Dec 09, 2017 at 09:43:21AM +0100, Cédric Le Goater wrote: > >> With the POWER9 processor comes a new interrupt controller called > >> XIVE. It is composed of three

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-11 Thread David Gibson
On Thu, Dec 21, 2017 at 11:12:06AM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2017-12-20 at 16:09 +1100, David Gibson wrote: > > > > As you've suggested in yourself, I think we might need to more > > explicitly model the different components of the XIVE system. As part > > of that, I think

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-11 Thread David Gibson
On Wed, Jan 17, 2018 at 03:39:46PM +0100, Cédric Le Goater wrote: > On 01/17/2018 12:10 PM, Benjamin Herrenschmidt wrote: > > On Wed, 2018-01-17 at 10:18 +0100, Cédric Le Goater wrote: > > Also, have we decided how the process of switching between XICS and > > XIVE will work vs. CAS ? >

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-02-11 Thread Cédric Le Goater
On 02/11/2018 11:55 PM, Benjamin Herrenschmidt wrote: > On Sun, 2018-02-11 at 19:08 +1100, David Gibson wrote: >> On Thu, Jan 18, 2018 at 08:27:52AM +1100, Benjamin Herrenschmidt wrote: >>> On Wed, 2018-01-17 at 15:39 +0100, Cédric Le Goater wrote: Migration is a problem. We will need both

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-02-11 Thread Alexey Kardashevskiy
On 12/02/18 09:55, Benjamin Herrenschmidt wrote: > On Sun, 2018-02-11 at 19:08 +1100, David Gibson wrote: >> On Thu, Jan 18, 2018 at 08:27:52AM +1100, Benjamin Herrenschmidt wrote: >>> On Wed, 2018-01-17 at 15:39 +0100, Cédric Le Goater wrote: Migration is a problem. We will need both backend

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-02-11 Thread Benjamin Herrenschmidt
On Sun, 2018-02-11 at 19:08 +1100, David Gibson wrote: > On Thu, Jan 18, 2018 at 08:27:52AM +1100, Benjamin Herrenschmidt wrote: > > On Wed, 2018-01-17 at 15:39 +0100, Cédric Le Goater wrote: > > > Migration is a problem. We will need both backend QEMU objects to be > > > available anyhow if we

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-02-11 Thread David Gibson
On Thu, Jan 18, 2018 at 08:27:52AM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2018-01-17 at 15:39 +0100, Cédric Le Goater wrote: > > Migration is a problem. We will need both backend QEMU objects to be > > available anyhow if we want to migrate. So we are back to the current > > solution

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-01-18 Thread Benjamin Herrenschmidt
On Thu, 2018-01-18 at 14:27 +0100, Cédric Le Goater wrote: > The source and the target machines should have the same realized > objects. I think this is the simplest solution to keep the migration > framework maintainable. Yeah well, it all boils down to qemu migration being completely brain

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-01-18 Thread Cédric Le Goater
On 01/17/2018 10:27 PM, Benjamin Herrenschmidt wrote: > On Wed, 2018-01-17 at 15:39 +0100, Cédric Le Goater wrote: >> Migration is a problem. We will need both backend QEMU objects to be >> available anyhow if we want to migrate. So we are back to the current >> solution creating both QEMU

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-01-17 Thread Benjamin Herrenschmidt
On Wed, 2018-01-17 at 15:39 +0100, Cédric Le Goater wrote: > Migration is a problem. We will need both backend QEMU objects to be > available anyhow if we want to migrate. So we are back to the current > solution creating both QEMU objects but we can try to defer some of the > KVM inits and

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-01-17 Thread Cédric Le Goater
> How does KVM knows which one to "activate" ? > > Can't we add an extra IRQ type and use vcpu->arch.irq_type for that ? > I haven't studied all the low level details though. I don't think connecting a vcpu to two different KVM devices makes sense ... So we need to destroy/recreate the KVM

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-01-17 Thread Cédric Le Goater
On 01/17/2018 12:10 PM, Benjamin Herrenschmidt wrote: > On Wed, 2018-01-17 at 10:18 +0100, Cédric Le Goater wrote: > Also, have we decided how the process of switching between XICS and > XIVE will work vs. CAS ? That's how it is described in the architecture. The current choice

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-01-17 Thread Benjamin Herrenschmidt
On Wed, 2018-01-17 at 10:18 +0100, Cédric Le Goater wrote: > > > > Also, have we decided how the process of switching between XICS and > > > > XIVE will work vs. CAS ? > > > > > > That's how it is described in the architecture. The current choice is > > > to create both XICS and XIVE objects and

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-01-17 Thread Cédric Le Goater
>>> Also, have we decided how the process of switching between XICS and >>> XIVE will work vs. CAS ? >> >> That's how it is described in the architecture. The current choice is >> to create both XICS and XIVE objects and choose at CAS which one to >> use. It relies today on the capability of the

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2017-12-21 Thread Benjamin Herrenschmidt
On Thu, 2017-12-21 at 10:16 +0100, Cédric Le Goater wrote: > On 12/21/2017 01:12 AM, Benjamin Herrenschmidt wrote: > > On Wed, 2017-12-20 at 16:09 +1100, David Gibson wrote: > > > > > > As you've suggested in yourself, I think we might need to more > > > explicitly model the different components

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2017-12-21 Thread Cédric Le Goater
On 12/21/2017 10:16 AM, Cédric Le Goater wrote: > On 12/21/2017 01:12 AM, Benjamin Herrenschmidt wrote: >> On Wed, 2017-12-20 at 16:09 +1100, David Gibson wrote: >>> >>> As you've suggested in yourself, I think we might need to more >>> explicitly model the different components of the XIVE system.

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2017-12-21 Thread Cédric Le Goater
On 12/21/2017 01:12 AM, Benjamin Herrenschmidt wrote: > On Wed, 2017-12-20 at 16:09 +1100, David Gibson wrote: >> >> As you've suggested in yourself, I think we might need to more >> explicitly model the different components of the XIVE system. As part >> of that, I think you need to be clearer

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2017-12-20 Thread Benjamin Herrenschmidt
On Wed, 2017-12-20 at 16:09 +1100, David Gibson wrote: > > As you've suggested in yourself, I think we might need to more > explicitly model the different components of the XIVE system. As part > of that, I think you need to be clearer in this base skeleton about > exactly what component your

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2017-12-19 Thread Cédric Le Goater
On 12/20/2017 06:09 AM, David Gibson wrote: > On Sat, Dec 09, 2017 at 09:43:21AM +0100, Cédric Le Goater wrote: >> With the POWER9 processor comes a new interrupt controller called >> XIVE. It is composed of three sub-engines : >> >> - Interrupt Virtualization Source Engine (IVSE). These are in

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2017-12-19 Thread David Gibson
On Sat, Dec 09, 2017 at 09:43:21AM +0100, Cédric Le Goater wrote: > With the POWER9 processor comes a new interrupt controller called > XIVE. It is composed of three sub-engines : > > - Interrupt Virtualization Source Engine (IVSE). These are in PHBs, > in the main controller for the IPIS

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2017-12-09 Thread Cédric Le Goater
> +static const VMStateDescription vmstate_spapr_xive = { > +.name = TYPE_SPAPR_XIVE, > +.version_id = 1, > +.minimum_version_id = 1, > +.needed = vmstate_spapr_xive_needed, > +.fields = (VMStateField[]) { > +VMSTATE_UINT32_EQUAL(nr_irqs, sPAPRXive, NULL), > +

[Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2017-12-09 Thread Cédric Le Goater
With the POWER9 processor comes a new interrupt controller called XIVE. It is composed of three sub-engines : - Interrupt Virtualization Source Engine (IVSE). These are in PHBs, in the main controller for the IPIS and in the PSI host bridge. They are configured to feed the IVRE with