[PATCH v4 0/6] ppc: reset the interrupt presenter from the CPU reset handler

Cédric Le Goater posted 6 patches 4 years, 6 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
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           | 32 ++++++++++++++++------
hw/ppc/spapr_cpu_core.c     | 42 ++++++++++++++++++++++-------
hw/ppc/spapr_irq.c          | 14 ++++++++++
14 files changed, 130 insertions(+), 65 deletions(-)
[PATCH v4 0/6] ppc: reset the interrupt presenter from the CPU reset handler
Posted by Cédric Le Goater 4 years, 6 months ago
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 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 (5):
  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           | 32 ++++++++++++++++------
 hw/ppc/spapr_cpu_core.c     | 42 ++++++++++++++++++++++-------
 hw/ppc/spapr_irq.c          | 14 ++++++++++
 14 files changed, 130 insertions(+), 65 deletions(-)

-- 
2.21.0


Re: [PATCH v4 0/6] ppc: reset the interrupt presenter from the CPU reset handler
Posted by Cédric Le Goater 4 years, 6 months ago
On 22/10/2019 15:42, 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.

This series is missing one patch. It needs a resend.

C.