From: David Gibson <david@gibson.dropbear.id.au>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Cédric Le Goater" <clg@kaod.org>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
"Alexey Kardashevskiy" <aik@ozlabs.ru>,
"Alexander Graf" <agraf@suse.de>
Subject: Re: [Qemu-devel] [RFC PATCH v2 00/21] Guest exploitation of the XIVE interrupt controller (POWER9)
Date: Thu, 28 Sep 2017 23:17:44 +1000 [thread overview]
Message-ID: <20170928131744.GF6445@umbus.fritz.box> (raw)
In-Reply-To: <1506587002.25626.20.camel@kernel.crashing.org>
[-- Attachment #1: Type: text/plain, Size: 3497 bytes --]
On Thu, Sep 28, 2017 at 10:23:22AM +0200, Benjamin Herrenschmidt wrote:
> On Wed, 2017-09-20 at 14:33 +0200, Cédric Le Goater wrote:
> > > > I'm thinking maybe trying to support the CAS negotiation of interrupt
> > > > controller from day 1 is warping the design. A better approach might
> > > > be first to implement XIVE only when given a specific machine option -
> > > > guest gets one or the other and can't negotiate.
> >
> > ok.
> >
> > CAS is not the most complex problem, we mostly need to share
> > the ICSIRQState array and the source offset. migration from older
> > machine is a problem. We are doomed to keep the existing XICS
> > framework available.
>
> I don't like sharing anything. I'd rather we had separate objects
> alltogether. If needed we can implement CAS by doing a partition reboot
> like pHyp does, at least initially, until we add ways to tear down and
> rebuild objects.
Right, I agree. The difficulty isn't really CAS reboot or not, it's
more that altering the virtual hardware at runtime is.. awkward.. in
qemu. And then there's the issue of migrating the state, which also
gets a bit complex.
As you've seen elsewhere, I think we need to get the XIVE model right
on its own first, then worry about those issues.
> The main issue is whether we can keep a consistent number space so the
> DT doesn't have to be completely rebuilt. If it does, then reboot will
> be the only practical option I'm afraid.
I think it should be possible to make a consistent number space. At
present the irq allocation is kind of tied to xics, but I think that's
fixable.
> > > > That should allow a more natural XIVE design to emerge, *then* we can
> > > > look at what's necessary to make boot-time negotiation possible.
> > >
> > > Actually, it just occurred to me that we might be making life hard for
> > > ourselves by trying to actually switch between full XICS and XIVE
> > > models. Coudln't we have new machine types always construct the XIVE
> > > infrastructure,
> >
> > yes.
> >
> > > but then implement the XICS RTAS and hcalls in terms of the XIVE virtual
> > > hardware.
>
> That's gross :-)
>
> This is also exactly what KVM does with real XIVE HW and there's also
> such an emulation in OPAL. I'd be weary of creating a 3rd one...
>
> I'd much prefer if we managed to:
>
> - Split the source numbering from the various state tracking objects
> so we can have that common
>
> - Either delay the creation to after CAS or tear down & re-create the
> state tracking objects at CAS time.
>
> > ok but migration will not be supported.
> >
> > > Since something more or less equivalent
> > > has already been done in both OPAL and the host kernel, I'm guessing
> > > this shouldn't be too hard at this point.
>
> It would very much suck to have yet another one of these.
Hm, ok.
> Also we need to understand how that would work in a KVM context, the
> kernel will provide a "XICS" state even on top of XIVE unless we switch
> the kernel object to native, but then the kernel will expect full
> exploitation.
>
> > Indeed that is how it is working currently on P9 kvm guests. hcalls are
> > implemented on top of XIVE native.
> >
> > Thanks,
> >
> >
> > C.
>
--
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 --]
prev parent reply other threads:[~2017-09-29 0:14 UTC|newest]
Thread overview: 90+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-11 17:12 [Qemu-devel] [RFC PATCH v2 00/21] Guest exploitation of the XIVE interrupt controller (POWER9) Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 01/21] ppc/xive: introduce a skeleton for the sPAPR XIVE interrupt controller Cédric Le Goater
2017-09-19 2:27 ` David Gibson
2017-09-19 13:15 ` Cédric Le Goater
2017-09-22 11:00 ` David Gibson
2017-09-22 12:42 ` Cédric Le Goater
2017-09-26 3:54 ` David Gibson
2017-09-26 9:45 ` Benjamin Herrenschmidt
2017-11-16 16:48 ` Cédric Le Goater
2017-11-16 15:58 ` Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 02/21] migration: add VMSTATE_STRUCT_VARRAY_UINT32_ALLOC Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 03/21] ppc/xive: define the XIVE internal tables Cédric Le Goater
2017-09-19 2:39 ` David Gibson
2017-09-19 13:46 ` Cédric Le Goater
2017-09-20 4:33 ` David Gibson
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 04/21] ppc/xive: provide a link to the sPAPR ICS object under XIVE Cédric Le Goater
2017-09-11 22:04 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2017-09-12 5:47 ` Cédric Le Goater
2017-09-19 2:44 ` [Qemu-devel] " David Gibson
2017-09-19 14:46 ` Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 05/21] ppc/xive: allocate IRQ numbers for the IPIs Cédric Le Goater
2017-09-19 2:45 ` David Gibson
2017-09-19 14:52 ` Cédric Le Goater
2017-09-20 4:35 ` David Gibson
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 06/21] ppc/xive: introduce handlers for interrupt sources Cédric Le Goater
2017-09-19 2:48 ` David Gibson
2017-09-19 15:08 ` Cédric Le Goater
2017-09-20 4:38 ` David Gibson
2017-09-21 14:11 ` Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 07/21] ppc/xive: add MMIO handlers for the XIVE " Cédric Le Goater
2017-09-19 2:57 ` David Gibson
2017-09-20 12:54 ` Cédric Le Goater
2017-09-22 10:58 ` David Gibson
2017-09-22 12:26 ` Cédric Le Goater
2017-09-28 8:27 ` Benjamin Herrenschmidt
2017-09-20 13:05 ` Cédric Le Goater
2017-09-28 8:29 ` Benjamin Herrenschmidt
2017-09-28 13:20 ` David Gibson
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 08/21] ppc/xive: describe the XIVE interrupt source flags Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 09/21] ppc/xive: extend the interrupt presenter model for XIVE Cédric Le Goater
2017-09-19 7:36 ` David Gibson
2017-09-19 19:28 ` Cédric Le Goater
2017-09-22 10:58 ` David Gibson
2017-09-22 12:27 ` Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 10/21] ppc/xive: add MMIO handlers for the XIVE TIMA Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 11/21] ppc/xive: push the EQ data in OS event queue Cédric Le Goater
2017-09-19 7:45 ` David Gibson
2017-09-19 19:36 ` Cédric Le Goater
2017-09-20 6:34 ` David Gibson
2017-09-28 8:12 ` Benjamin Herrenschmidt
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 12/21] ppc/xive: notify the CPU when interrupt priority is more privileged Cédric Le Goater
2017-09-19 7:50 ` David Gibson
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 13/21] ppc/xive: handle interrupt acknowledgment by the O/S Cédric Le Goater
2017-09-19 7:53 ` David Gibson
2017-09-20 9:40 ` Cédric Le Goater
2017-09-28 8:14 ` Benjamin Herrenschmidt
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 14/21] ppc/xive: add support for the SET_OS_PENDING command Cédric Le Goater
2017-09-19 7:55 ` David Gibson
2017-09-20 9:47 ` Cédric Le Goater
2017-09-28 8:18 ` Benjamin Herrenschmidt
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 15/21] spapr: modify spapr_populate_pci_dt() to use a 'nr_irqs' argument Cédric Le Goater
2017-09-19 7:56 ` David Gibson
2017-09-20 9:49 ` Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 16/21] spapr: add a XIVE object to the sPAPR machine Cédric Le Goater
2017-09-19 8:38 ` David Gibson
2017-09-20 9:51 ` Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 17/21] ppc/xive: add hcalls support Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 18/21] ppc/xive: add device tree support Cédric Le Goater
2017-09-19 8:44 ` David Gibson
2017-09-20 12:26 ` Cédric Le Goater
2017-09-21 1:35 ` David Gibson
2017-09-21 11:21 ` Cédric Le Goater
2017-09-22 10:54 ` David Gibson
2017-09-28 8:43 ` Benjamin Herrenschmidt
2017-09-28 8:51 ` Cédric Le Goater
2017-09-28 10:03 ` Benjamin Herrenschmidt
2017-09-28 12:50 ` Cédric Le Goater
2017-09-28 8:31 ` Benjamin Herrenschmidt
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 19/21] ppc/xive: introduce a helper to map the XIVE memory regions Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 20/21] ppc/xics: introduce a qirq_get() helper in the XICSFabric Cédric Le Goater
2017-09-11 17:12 ` [Qemu-devel] [RFC PATCH v2 21/21] spapr: activate XIVE exploitation mode Cédric Le Goater
2017-09-19 8:20 ` [Qemu-devel] [RFC PATCH v2 00/21] Guest exploitation of the XIVE interrupt controller (POWER9) David Gibson
2017-09-19 8:46 ` David Gibson
2017-09-20 12:33 ` Cédric Le Goater
2017-09-21 1:25 ` David Gibson
2017-09-21 14:18 ` Cédric Le Goater
2017-09-22 10:33 ` David Gibson
2017-09-22 12:32 ` Cédric Le Goater
2017-09-28 8:23 ` Benjamin Herrenschmidt
2017-09-28 13:17 ` David Gibson [this message]
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=20170928131744.GF6445@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).