From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [Qemu-devel] [PATCH v6 04/37] ppc/xive: introduce the XiveRouter model
Date: Mon, 10 Dec 2018 14:07:04 +1100 [thread overview]
Message-ID: <20181210030704.GG4261@umbus.fritz.box> (raw)
In-Reply-To: <bb2b0691-2366-cb73-4407-af16a812725b@kaod.org>
[-- Attachment #1: Type: text/plain, Size: 4093 bytes --]
On Fri, Dec 07, 2018 at 08:49:21AM +0100, Cédric Le Goater wrote:
> On 12/7/18 2:57 AM, David Gibson wrote:
> > On Thu, Dec 06, 2018 at 07:22:54AM +0100, Cédric Le Goater wrote:
> >> On 12/6/18 4:41 AM, David Gibson wrote:
> >>> On Thu, Dec 06, 2018 at 12:22:18AM +0100, Cédric Le Goater wrote:
> >>>> The XiveRouter models the second sub-engine of the XIVE architecture :
> >>>> the Interrupt Virtualization Routing Engine (IVRE).
> >>>>
> >>>> The IVRE handles event notifications of the IVSE and performs the
> >>>> interrupt routing process. For this purpose, it uses a set of tables
> >>>> stored in system memory, the first of which being the Event Assignment
> >>>> Structure (EAS) table.
> >>>>
> >>>> The EAT associates an interrupt source number with an Event Notification
> >>>> Descriptor (END) which will be used in a second phase of the routing
> >>>> process to identify a Notification Virtual Target.
> >>>>
> >>>> The XiveRouter is an abstract class which needs to be inherited from
> >>>> to define a storage for the EAT, and other upcoming tables.
> >>>>
> >>>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> >>>> ---
> >>>> include/hw/ppc/xive.h | 31 ++++++++++++++++
> >>>> include/hw/ppc/xive_regs.h | 50 +++++++++++++++++++++++++
> >>>> hw/intc/xive.c | 76 ++++++++++++++++++++++++++++++++++++++
> >>>> 3 files changed, 157 insertions(+)
> >>>> create mode 100644 include/hw/ppc/xive_regs.h
> >>>>
> >>>> diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h
> >>>> index 6770cffec67d..57ec9f84f527 100644
> >>>> --- a/include/hw/ppc/xive.h
> >>>> +++ b/include/hw/ppc/xive.h
> >>>> @@ -141,6 +141,8 @@
> >>>> #define PPC_XIVE_H
> >>>>
> >>>> #include "hw/qdev-core.h"
> >>>> +#include "hw/sysbus.h"
> >>>> +#include "hw/ppc/xive_regs.h"
> >>>>
> >>>> /*
> >>>> * XIVE Fabric (Interface between Source and Router)
> >>>> @@ -297,4 +299,33 @@ static inline void xive_source_irq_set(XiveSource *xsrc, uint32_t srcno,
> >>>> }
> >>>> }
> >>>>
> >>>> +/*
> >>>> + * XIVE Router
> >>>> + */
> >>>> +
> >>>> +typedef struct XiveRouter {
> >>>> + SysBusDevice parent;
> >>>
> >>> I thought the plan was to make XiveRouter as well as XiveSource a
> >>> TYPE_DEVICE descendent rather than a SysBusDevice?
> >>
> >> We start talking about that, indeed, but then :
> >>
> >> https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg06407.html
> >>
> >> I thought we concluded that it was going to get too complex.
> >>
> >> Also, sPAPRXive is a direct descendant of XiveRouter and we want sPAPRXive
> >> on SysBus.
> >
> > Ah, good point. So, to clarify my thinking here - I think from a
> > theoretical point of view, having XiveRouter not be sysbus and
> > including it by composition is probably the "correct" approach.
>
> One possible solution would be to transform the XiveRouter in a QOM
> interface, this will be possible when I have removed the chip_id field,
> and define the VST accessors as we do today. I am not sure how QOM
> interfaces are considered, but I think they are more in the composition
> pattern than inheritance. That way, we could have sPAPRXive directly
> inherit from SysBusDevice.
>
> I can give it a try for v7, and you could merge the small XiveRouter
> changes in the current XiveRouter patch.
>
> > But I can also see that that will be a bit of a pain in practice. So
> > yes, keeping it as a SysBusDevice is ok, at least as long as any
> > migration stuff is in the "outermost" / most specific type, which I
> > believe it is.
>
> By this sentence, you mean that we don't rely on the XiveRouter model
> to capture the sPAPRXive state ?
Yes. Basically we should only have VMStateDecriptions registered by
the spapr specific objects, not the internal parts / superclasses
they're composed of.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-12-10 3:07 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-05 23:22 [Qemu-devel] [PATCH v6 00/37] ppc: support for the XIVE interrupt controller (POWER9) Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 01/37] ppc/xive: introduce a XIVE interrupt source model Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 02/37] ppc/xive: add support for the LSI interrupt sources Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 03/37] ppc/xive: introduce the XiveNotifier interface Cédric Le Goater
2018-12-06 3:25 ` David Gibson
2018-12-06 6:17 ` Cédric Le Goater
2018-12-07 2:07 ` David Gibson
2018-12-07 9:08 ` Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 04/37] ppc/xive: introduce the XiveRouter model Cédric Le Goater
2018-12-06 3:41 ` David Gibson
2018-12-06 6:22 ` Cédric Le Goater
2018-12-07 1:57 ` David Gibson
2018-12-07 7:49 ` Cédric Le Goater
2018-12-10 3:07 ` David Gibson [this message]
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 05/37] ppc/xive: introduce the XIVE Event Notification Descriptors Cédric Le Goater
2018-12-06 3:56 ` David Gibson
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 06/37] ppc/xive: add support for the END Event State buffers Cédric Le Goater
2018-12-06 4:09 ` David Gibson
2018-12-06 6:30 ` Cédric Le Goater
2018-12-07 2:05 ` David Gibson
2018-12-07 7:48 ` Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 07/37] ppc/xive: introduce the XIVE interrupt thread context Cédric Le Goater
2018-12-06 4:31 ` David Gibson
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 08/37] ppc/xive: introduce a simplified XIVE presenter Cédric Le Goater
2018-12-07 3:10 ` David Gibson
2018-12-07 8:49 ` Cédric Le Goater
2018-12-10 3:05 ` David Gibson
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 09/37] ppc/xive: notify the CPU when the interrupt priority is more privileged Cédric Le Goater
2018-12-07 3:27 ` David Gibson
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 10/37] spapr/xive: introduce a XIVE interrupt controller Cédric Le Goater
2018-12-07 3:39 ` David Gibson
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 11/37] spapr/xive: use the VCPU id as a NVT identifier Cédric Le Goater
2018-12-07 3:46 ` David Gibson
2018-12-07 8:05 ` Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 12/37] spapr: initialize VSMT before initializing the IRQ backend Cédric Le Goater
2018-12-07 3:59 ` David Gibson
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 13/37] spapr: introduce a spapr_irq_init() routine Cédric Le Goater
2018-12-07 4:04 ` David Gibson
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 14/37] spapr: modify the irq backend 'init' method Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 15/37] spapr: export and rename the xics_max_server_number() routine Cédric Le Goater
2018-12-07 4:07 ` David Gibson
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 16/37] spapr: introdude a new machine IRQ backend for XIVE Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 17/37] spapr: add hcalls support for the XIVE exploitation interrupt mode Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 18/37] spapr: add device tree support for the XIVE exploitation mode Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 19/37] spapr: allocate the interrupt thread context under the CPU core Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 20/37] spapr: extend the sPAPR IRQ backend for XICS migration Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 21/37] spapr: add a 'reset' method to the sPAPR IRQ backend Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 22/37] spapr: add a 'pseries-3.1-xive' machine type Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 23/37] linux-headers: update to 4.20-rc5 Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 24/37] spapr/xive: add KVM support Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 25/37] spapr/xive: add state synchronization with KVM Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 26/37] spapr/xive: introduce a VM state change handler Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 27/37] spapr/xive: add migration support for KVM Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 28/37] spapr/xive: fix migration of the XiveTCTX under TCG Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 29/37] spapr: set the interrupt presenter at reset Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 30/37] spapr/xive: enable XIVE MMIOs " Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 31/37] spapr: add a 'pseries-3.1-dual' machine type Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 32/37] ppc/xics: introduce a icp_kvm_connect() routine Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 33/37] spapr/rtas: modify spapr_rtas_register() to remove RTAS handlers Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 34/37] sysbus: add a sysbus_mmio_unmap() helper Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 35/37] spapr: introduce routines to delete the KVM IRQ device Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 36/37] spapr: check for KVM IRQ device activation Cédric Le Goater
2018-12-05 23:22 ` [Qemu-devel] [PATCH v6 37/37] spapr: add KVM support to the 'dual' machine Cédric Le Goater
2018-12-06 1:10 ` [Qemu-devel] [PATCH v6 00/37] ppc: support for the XIVE interrupt controller (POWER9) no-reply
2018-12-06 6:14 ` Cédric Le Goater
2018-12-06 9:24 ` Fam Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181210030704.GG4261@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=benh@kernel.crashing.org \
--cc=clg@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.