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 v7 16/19] spapr: introduce a new sPAPR IRQ backend supporting XIVE and XICS
Date: Sat, 15 Dec 2018 19:09:09 +1100 [thread overview]
Message-ID: <20181215080908.GL29278@umbus.fritz.box> (raw)
In-Reply-To: <d5a33faf-cd68-861e-e795-d587b1b49bc7@kaod.org>
[-- Attachment #1: Type: text/plain, Size: 2206 bytes --]
On Wed, Dec 12, 2018 at 10:13:29AM +0100, Cédric Le Goater wrote:
> [ ... ]
>
>
> >>>> +
> >>>> +static qemu_irq spapr_qirq_dual(sPAPRMachineState *spapr, int irq)
> >>>> +{
> >>>> + return spapr_irq_current(spapr)->qirq(spapr, irq);
> >>>
> >>> Urgh... I don't think this is going to work. IIRC the various devices
> >>> (PHB, VIO, etc.) are wired up to their qirqs at realize() time, so if
> >>> you reboot from a XIVE guest to XICS guest (or maybe the other way
> >>> around) the peripherals won't be able to signal irqs in the new
> >>> scheme.
> >>
> >> It does. The IRQ numbers are claimed in both backends.
> >
> > Yes, I realize that, but the two backends still have their own set of
> > qirqs, which have their own set_irq routines associated with them.
> >
> >> This is the problem since the very beginning. For reset and migration
> >> to work, we need to keep in sync the IRQ number space of the machine
> >> and the different interrupt controllers.
> >
> > Sure, we have the numbers in sync, but that won't help if when the
> > peripherals do a qemu_irq_pulse() it goes to the wrong backend's
> > trigger routine.
>
> Ah. You mean that the devices could bypass the sPAPR IRQ layer and
> trigger the IRQ directly from the IRQ controller model ? it's not
> the case today.
Ah, right, sorry. We're saved by the fact that basically the only
root level devices for spapr are the PHB and VIO devices, and it so
happens that those look up the relevant qirqs from spapr at interrupt
time, rather than in advance.
I think it's fragile to rely on that - qirqs are supposed to be stable
objects that devices can keep a reference to and use later.
> I agree that having a common set of qirqs and a qemu_irq handler
> doing the dispatch on the selected interrupt contoller model is
> good idea. I didn't go in that direction because KVM brings additional
> head aches.
>
> Where would put the qirqs ? at the machine level I suppose.
Yes.
--
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-15 8:16 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-09 19:45 [Qemu-devel] [PATCH v7 00/19] ppc: support for the XIVE interrupt controller (POWER9) Cédric Le Goater
2018-12-09 19:45 ` [Qemu-devel] [PATCH v7 01/19] ppc/xive: add support for the END Event State Buffers Cédric Le Goater
2018-12-10 4:16 ` David Gibson
2018-12-10 7:11 ` Cédric Le Goater
2018-12-09 19:45 ` [Qemu-devel] [PATCH v7 02/19] ppc/xive: introduce the XIVE interrupt thread context Cédric Le Goater
2018-12-10 4:19 ` David Gibson
2018-12-09 19:45 ` [Qemu-devel] [PATCH v7 03/19] ppc/xive: introduce a simplified XIVE presenter Cédric Le Goater
2018-12-10 4:27 ` David Gibson
2018-12-10 7:15 ` Cédric Le Goater
2018-12-11 1:37 ` David Gibson
2018-12-11 10:43 ` Cédric Le Goater
2018-12-09 19:45 ` [Qemu-devel] [PATCH v7 04/19] ppc/xive: notify the CPU when the interrupt priority is more privileged Cédric Le Goater
2018-12-09 19:45 ` [Qemu-devel] [PATCH v7 05/19] spapr/xive: introduce a XIVE interrupt controller Cédric Le Goater
2018-12-10 4:36 ` David Gibson
2018-12-09 19:45 ` [Qemu-devel] [PATCH v7 06/19] spapr/xive: use the VCPU id as a NVT identifier Cédric Le Goater
2018-12-10 4:42 ` David Gibson
2018-12-09 19:45 ` [Qemu-devel] [PATCH v7 07/19] spapr: introduce a new machine IRQ backend for XIVE Cédric Le Goater
2018-12-10 4:45 ` David Gibson
2018-12-09 19:45 ` [Qemu-devel] [PATCH v7 08/19] spapr: add hcalls support for the XIVE exploitation interrupt mode Cédric Le Goater
2018-12-10 6:34 ` David Gibson
2018-12-09 19:46 ` [Qemu-devel] [PATCH v7 09/19] spapr: add device tree support for the XIVE exploitation mode Cédric Le Goater
2018-12-10 6:39 ` David Gibson
2018-12-10 7:53 ` Cédric Le Goater
2018-12-11 0:38 ` David Gibson
2018-12-11 9:06 ` Cédric Le Goater
2018-12-12 0:19 ` David Gibson
2018-12-12 7:37 ` Cédric Le Goater
2018-12-09 19:46 ` [Qemu-devel] [PATCH v7 10/19] spapr: allocate the interrupt thread context under the CPU core Cédric Le Goater
2018-12-09 19:46 ` [Qemu-devel] [PATCH v7 11/19] spapr: extend the sPAPR IRQ backend for XICS migration Cédric Le Goater
2018-12-09 19:46 ` [Qemu-devel] [PATCH v7 12/19] spapr: add a 'reset' method to the sPAPR IRQ backend Cédric Le Goater
2018-12-10 6:42 ` David Gibson
2018-12-10 7:30 ` Cédric Le Goater
2018-12-11 10:55 ` Cédric Le Goater
2018-12-09 19:46 ` [Qemu-devel] [PATCH v7 13/19] spapr: add an extra OV5 field " Cédric Le Goater
2018-12-09 19:46 ` [Qemu-devel] [PATCH v7 14/19] spapr: set the interrupt presenter at reset Cédric Le Goater
2018-12-11 1:46 ` David Gibson
2018-12-11 10:58 ` Cédric Le Goater
2018-12-09 19:46 ` [Qemu-devel] [PATCH v7 15/19] spapr/xive: enable XIVE MMIOs " Cédric Le Goater
2018-12-11 1:47 ` David Gibson
2018-12-11 10:14 ` Cédric Le Goater
2018-12-12 0:32 ` David Gibson
2018-12-09 19:46 ` [Qemu-devel] [PATCH v7 16/19] spapr: introduce a new sPAPR IRQ backend supporting XIVE and XICS Cédric Le Goater
2018-12-11 2:03 ` David Gibson
2018-12-11 10:19 ` Cédric Le Goater
2018-12-12 0:54 ` David Gibson
2018-12-12 9:13 ` Cédric Le Goater
2018-12-15 8:09 ` David Gibson [this message]
2018-12-09 19:46 ` [Qemu-devel] [PATCH v7 17/19] spapr: Add a pseries-4.0 machine type Cédric Le Goater
2018-12-09 22:05 ` Benjamin Herrenschmidt
2018-12-10 3:41 ` David Gibson
2018-12-10 7:09 ` Cédric Le Goater
2018-12-10 6:45 ` David Gibson
2018-12-09 19:46 ` [Qemu-devel] [PATCH v7 18/19] spapr: add a 'pseries-4.0-xive' " Cédric Le Goater
2018-12-10 22:17 ` Cédric Le Goater
2018-12-11 2:06 ` David Gibson
2018-12-11 10:42 ` Cédric Le Goater
2018-12-11 16:44 ` Cédric Le Goater
2018-12-15 8:03 ` David Gibson
2018-12-12 0:34 ` David Gibson
2018-12-12 7:26 ` Cédric Le Goater
2018-12-09 19:46 ` [Qemu-devel] [PATCH v7 19/19] spapr: add a 'pseries-4.0-dual' " Cédric Le Goater
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=20181215080908.GL29278@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 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).