From: Greg Kurz <groug@kaod.org>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: Gustavo Romero <gromero@linux.ibm.com>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH v2 5/6] spapr/xive: Activate StoreEOI at the source level
Date: Wed, 7 Oct 2020 09:26:48 +0200 [thread overview]
Message-ID: <20201007092648.63e848f3@bahia.lan> (raw)
In-Reply-To: <66bb5bdf-fe88-33a8-85ea-dde8aa78379e@kaod.org>
On Tue, 6 Oct 2020 19:41:28 +0200
Cédric Le Goater <clg@kaod.org> wrote:
> On 10/6/20 7:06 PM, Greg Kurz wrote:
> > On Mon, 5 Oct 2020 18:51:46 +0200
> > Cédric Le Goater <clg@kaod.org> wrote:
> >
> >> When the StoreEOI capability is "on", the H_INT_GET_SOURCE_INFO will
> >> set the StoreEOI flag for all sources. This could be an issue if
> >> StoreEOI is not supported on a specific source, of a passthrough
> >> device for instance. In that case, we could either introduce a new KVM
> >> ioctl to query the characteristics of the source at the HW level or
> >> deactivate StoreEOI on the machine.
> >>
> >> This is theoretically unsafe on a POWER9 host but it still runs.
> >>
> >
> > Patch looks good but as said before, what is the likeliness of something
> > really painful to happen on a POWER9 host ?
>
> Nothing will happen because POWER9 systems deactivate StoreEOI. You need
> a custom skiboot to add it back.
>
Ok, then:
Reviewed-by: Greg Kurz <groug@kaod.org>
> C.
>
>
> >> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> >> ---
> >> hw/intc/spapr_xive.c | 1 +
> >> hw/ppc/spapr_irq.c | 6 ++++++
> >> 2 files changed, 7 insertions(+)
> >>
> >> diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c
> >> index 1fa09f287ac0..41f2719ff93a 100644
> >> --- a/hw/intc/spapr_xive.c
> >> +++ b/hw/intc/spapr_xive.c
> >> @@ -280,6 +280,7 @@ static void spapr_xive_instance_init(Object *obj)
> >> SpaprXive *xive = SPAPR_XIVE(obj);
> >>
> >> object_initialize_child(obj, "source", &xive->source, TYPE_XIVE_SOURCE);
> >> + object_property_add_alias(obj, "flags", OBJECT(&xive->source), "flags");
> >>
> >> object_initialize_child(obj, "end_source", &xive->end_source,
> >> TYPE_XIVE_END_SOURCE);
> >> diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c
> >> index f59960339ec3..cdf9f9df4173 100644
> >> --- a/hw/ppc/spapr_irq.c
> >> +++ b/hw/ppc/spapr_irq.c
> >> @@ -325,9 +325,14 @@ void spapr_irq_init(SpaprMachineState *spapr, Error **errp)
> >>
> >> if (spapr->irq->xive) {
> >> uint32_t nr_servers = spapr_max_server_number(spapr);
> >> + uint64_t flags = 0;
> >> DeviceState *dev;
> >> int i;
> >>
> >> + if (spapr_get_cap(spapr, SPAPR_CAP_STOREEOI) == SPAPR_CAP_ON) {
> >> + flags |= XIVE_SRC_STORE_EOI;
> >> + }
> >> +
> >> dev = qdev_new(TYPE_SPAPR_XIVE);
> >> qdev_prop_set_uint32(dev, "nr-irqs", smc->nr_xirqs + SPAPR_XIRQ_BASE);
> >> /*
> >> @@ -337,6 +342,7 @@ void spapr_irq_init(SpaprMachineState *spapr, Error **errp)
> >> qdev_prop_set_uint32(dev, "nr-ends", nr_servers << 3);
> >> object_property_set_link(OBJECT(dev), "xive-fabric", OBJECT(spapr),
> >> &error_abort);
> >> + object_property_set_int(OBJECT(dev), "flags", flags, &error_abort);
> >> sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
> >>
> >> spapr->xive = SPAPR_XIVE(dev);
> >
>
next prev parent reply other threads:[~2020-10-07 7:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 16:51 [PATCH v2 0/6] spapr/xive: Activate StoreEOI in P10 compat guests Cédric Le Goater
2020-10-05 16:51 ` [PATCH v2 1/6] spapr/xive: Introduce a StoreEOI capability Cédric Le Goater
2020-10-06 16:42 ` Greg Kurz
2020-10-07 5:59 ` Cédric Le Goater
2020-10-07 7:24 ` Greg Kurz
2020-10-05 16:51 ` [PATCH v2 2/6] spapr/xive: Add a warning when StoreEOI is activated on POWER8 CPUs Cédric Le Goater
2020-10-06 16:52 ` Greg Kurz
2020-10-05 16:51 ` [PATCH v2 3/6] spapr/xive: Add a warning when StoreEOI is activated on POWER9 CPUs Cédric Le Goater
2020-10-06 16:58 ` Greg Kurz
2020-10-06 17:03 ` Cédric Le Goater
2020-10-07 8:56 ` Greg Kurz
2020-10-07 9:21 ` Cédric Le Goater
2020-10-05 16:51 ` [PATCH v2 4/6] spapr/xive: Enforce load-after-store ordering Cédric Le Goater
2020-10-06 17:02 ` Greg Kurz
2020-10-05 16:51 ` [PATCH v2 5/6] spapr/xive: Activate StoreEOI at the source level Cédric Le Goater
2020-10-06 17:06 ` Greg Kurz
2020-10-06 17:41 ` Cédric Le Goater
2020-10-07 7:26 ` Greg Kurz [this message]
2020-10-05 16:51 ` [PATCH v2 6/6] spapr/xive: Introduce a new CAS value for the StoreEOI capability Cédric Le Goater
2020-10-06 17:39 ` Greg Kurz
2020-10-06 17:56 ` Cédric Le Goater
2020-10-07 13:43 ` Greg Kurz
2020-10-07 14:28 ` Cédric Le Goater
2020-10-09 0:23 ` [PATCH v2 0/6] spapr/xive: Activate StoreEOI in P10 compat guests David Gibson
2020-10-09 5:57 ` Cédric Le Goater
2020-10-12 5:38 ` David Gibson
2020-11-02 13:22 ` Cédric Le Goater
2020-11-23 6:44 ` David Gibson
2020-11-23 11:16 ` 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=20201007092648.63e848f3@bahia.lan \
--to=groug@kaod.org \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=gromero@linux.ibm.com \
--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).