All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: "Cédric Le Goater" <clg@kaod.org>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	"Greg Kurz" <groug@kaod.org>
Subject: [PATCH v3 0/4] ppc: reset the interrupt presenter from the CPU reset handler
Date: Tue, 22 Oct 2019 09:22:42 +0200	[thread overview]
Message-ID: <20191022072246.9200-1-clg@kaod.org> (raw)

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.

Thanks,

C.

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 (3):
  spapr: move CPU reset after presenter creation
  ppc: reset the interrupt presenter from the CPU reset handler
  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/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           |  8 ++++++
 hw/ppc/spapr_cpu_core.c     | 38 +++++++++++++++++++-------
 hw/ppc/spapr_irq.c          | 14 ++++++++++
 13 files changed, 107 insertions(+), 57 deletions(-)

-- 
2.21.0



             reply	other threads:[~2019-10-22  7:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22  7:22 Cédric Le Goater [this message]
2019-10-22  7:22 ` [PATCH v3 1/4] spapr: move CPU reset after presenter creation Cédric Le Goater
2019-10-22  8:53   ` Philippe Mathieu-Daudé
2019-10-22  9:53   ` Greg Kurz
2019-10-22  7:22 ` [PATCH v3 2/4] spapr_cpu_core: Implement DeviceClass::reset Cédric Le Goater
2019-10-22  8:58   ` Philippe Mathieu-Daudé
2019-10-22  7:22 ` [PATCH v3 3/4] ppc: reset the interrupt presenter from the CPU reset handler Cédric Le Goater
2019-10-22  9:08   ` Philippe Mathieu-Daudé
2019-10-22 11:43     ` Cédric Le Goater
2019-10-22 11:19   ` Greg Kurz
2019-10-22  7:22 ` [PATCH v3 4/4] spapr/xive: Set the OS CAM line at reset Cédric Le Goater
2019-10-22 11:27   ` Greg Kurz

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=20191022072246.9200-1-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@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.