From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
"Greg Kurz" <groug@kaod.org>
Subject: Re: [PATCH v5 0/7] ppc: reset the interrupt presenter from the CPU reset handler
Date: Thu, 24 Oct 2019 13:35:02 +1100 [thread overview]
Message-ID: <20191024023502.GN6439@umbus.fritz.box> (raw)
In-Reply-To: <20191022163812.330-1-clg@kaod.org>
[-- Attachment #1: Type: text/plain, Size: 2908 bytes --]
On Tue, Oct 22, 2019 at 06:38:05PM +0200, Cédric Le Goater wrote:
> Hello,
>
> On the sPAPR machine and PowerNV machine, the interrupt presenters are
> created by a machine handler at the core level and are reseted
> independently. This is not consistent and it raises issues when it
> comes to handle hot-plugged CPUs. In that case, the presenters are not
> reseted. This is less of an issue in XICS, although a zero MFFR could
> be a concern, but in XIVE, the OS CAM line is not set and this breaks
> the presenting algorithm. The current code has workarounds which need
> a global cleanup.
>
> Extend the sPAPR IRQ backend and the PowerNV Chip class with a new
> cpu_intc_reset() handler called by the CPU reset handler and remove
> the XiveTCTX reset handler which is now redundant.
>
> Set the OS CAM line when the interrupt presenter of the sPAPR core is
> reseted. This will also cover the case of hot-plugged CPUs.
I'm not totally convinced whether every step here is done the best it
can be. But it addresses real problems, so I've applied anyway. I
will make some comments inline, which could be addressed in follow up
patches.
>
> Thanks,
>
> C.
>
> Changes in v5:
>
> - Removed useless PNV_CHIP() cast
>
> Changes in v4:
>
> - Introduce a PnvCore reset handler
> - Add PnvChip pointer to PnvCore
>
> Changes in v3:
>
> - Introduced a DeviceClass::reset for the CPU (Greg)
> - add support for PowerNV
>
> Changes in v2:
>
> - removed property
> - simplified reset handlers
>
> Cédric Le Goater (6):
> spapr: move CPU reset after presenter creation
> ppc/pnv: Introduce a PnvCore reset handler
> ppc/pnv: Add a PnvChip pointer to PnvCore
> ppc: Reset the interrupt presenter from the CPU reset handler
> ppc/pnv: Fix naming of routines realizing the CPUs
> spapr/xive: Set the OS CAM line at reset
>
> Greg Kurz (1):
> spapr_cpu_core: Implement DeviceClass::reset
>
> include/hw/ppc/pnv.h | 1 +
> include/hw/ppc/pnv_core.h | 3 +++
> include/hw/ppc/spapr_irq.h | 2 ++
> include/hw/ppc/spapr_xive.h | 1 -
> include/hw/ppc/xics.h | 1 +
> include/hw/ppc/xive.h | 1 +
> hw/intc/spapr_xive.c | 53 +++++++++++++++++--------------------
> hw/intc/xics.c | 8 ++----
> hw/intc/xics_spapr.c | 7 +++++
> hw/intc/xive.c | 12 +--------
> hw/ppc/pnv.c | 18 +++++++++++++
> hw/ppc/pnv_core.c | 31 ++++++++++++++++------
> hw/ppc/spapr_cpu_core.c | 44 +++++++++++++++++++++++-------
> hw/ppc/spapr_irq.c | 14 ++++++++++
> 14 files changed, 131 insertions(+), 65 deletions(-)
>
--
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:[~2019-10-24 3:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 16:38 [PATCH v5 0/7] ppc: reset the interrupt presenter from the CPU reset handler Cédric Le Goater
2019-10-22 16:38 ` [PATCH v5 1/7] spapr: move CPU reset after presenter creation Cédric Le Goater
2019-10-22 16:38 ` [PATCH v5 2/7] spapr_cpu_core: Implement DeviceClass::reset Cédric Le Goater
2019-10-22 16:38 ` [PATCH v5 3/7] ppc/pnv: Introduce a PnvCore reset handler Cédric Le Goater
2019-10-23 11:18 ` Philippe Mathieu-Daudé
2019-10-24 2:33 ` David Gibson
2019-10-22 16:38 ` [PATCH v5 4/7] ppc/pnv: Add a PnvChip pointer to PnvCore Cédric Le Goater
2019-10-23 11:19 ` Philippe Mathieu-Daudé
2019-10-24 2:38 ` David Gibson
2019-10-24 9:57 ` Cédric Le Goater
2019-10-24 16:48 ` Greg Kurz
2019-10-27 16:54 ` David Gibson
2019-10-27 16:52 ` David Gibson
2019-10-24 17:30 ` Greg Kurz
2019-10-27 16:54 ` David Gibson
2019-10-22 16:38 ` [PATCH v5 5/7] ppc: Reset the interrupt presenter from the CPU reset handler Cédric Le Goater
2019-10-22 20:26 ` Greg Kurz
2019-10-23 11:25 ` Philippe Mathieu-Daudé
2019-10-24 2:40 ` David Gibson
2019-10-22 16:38 ` [PATCH v5 6/7] ppc/pnv: Fix naming of routines realizing the CPUs Cédric Le Goater
2019-10-23 11:26 ` Philippe Mathieu-Daudé
2019-10-22 16:38 ` [PATCH v5 7/7] spapr/xive: Set the OS CAM line at reset Cédric Le Goater
2019-10-24 2:41 ` David Gibson
2019-10-24 2:35 ` 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=20191024023502.GN6439@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=groug@kaod.org \
--cc=philmd@redhat.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).