[Skiboot] [RFC 0/2] CAPI disabling support for kexec

Andrew Donnellan andrew.donnellan at au1.ibm.com
Fri Sep 16 20:22:46 AEST 2016


Currently, if you attempt to kexec into a new kernel from a machine with a
CAPI card and the cxl driver loaded, you are going to have an exceedingly
bad time. It turns out that the hardware doesn't really cope very well with
going through the standard Linux PCI initialisation process while a PHB is
still in CAPI mode. Checkstops everywhere!

This series implements preliminary support for switching a PHB from CAPI
mode back to regular PCIe mode during a complete reset, for use with kexec.

The SCOM sequences have been derived through a mix of advice from
Bill/JT/Vaibhav, reading through various internal IBM documents, and trial
and error...

This has only gotten the very lightest of testing - I've kexec-ed quite a
few times with no real problems, and I've run some basic CAPI tests that
don't seem to fail too much more than they normally fail. It does look like
we get spammed with a tonne of HMIs and frozen PE messages in the skiboot
log, not sure how bad this is.

I've successfully used an earlier version of this series along with Ben
Herrenschmidt's fast reboot RFC - it requires a small amount of additional
code to initiate a creset on each PHB during the PCI reinit.

At this stage, I haven't thought too hard about getting to the point where
we can do this after Linux has booted for stuff like PCI hotplug...
triggering a creset after the Linux EEH handling is all set up can get
interesting.

I'm about to submit a corresponding RFC for the kernel to linuxppc-dev.

Thanks to Vaibhav Jain (who made a previous attempt at this), Mikey
Neuling, Ben Herrenschmidt, Gavin Shan, Bill Daly and JT Kellington for
advice on various bits of this.

Andrew

Andrew Donnellan (2):
  hw/phb3: add OPAL call to get current PHB CAPI state
  hw/phb3: disable CAPI mode during complete reset

 core/pci-opal.c                                 |  17 ++-
 doc/opal-api/opal-pci-get-phb-capi-mode-128.rst |  24 +++-
 hw/phb3.c                                       | 135 +++++++++++++++++-
 include/opal-api.h                              |   3 +-
 include/pci.h                                   |   2 +-
 include/phb3.h                                  |   9 +-
 6 files changed, 184 insertions(+), 6 deletions(-)
 create mode 100644 doc/opal-api/opal-pci-get-phb-capi-mode-128.rst

base-commit: 3bee8cfa312356c8eafc2f3335dbc6529068b682
-- 
git-series 0.8.10



More information about the Skiboot mailing list