[PATCH for-6.0 v2 0/4] spapr: Perform hotplug sanity checks at pre-plug

Greg Kurz posted 4 patches 3 years, 5 months ago
Failed in applying to current master (apply log)
include/hw/ppc/spapr_drc.h |  8 ++++++-
hw/ppc/spapr.c             | 49 ++++++++++++++++++--------------------
hw/ppc/spapr_drc.c         |  8 ++-----
hw/ppc/spapr_nvdimm.c      |  2 +-
hw/ppc/spapr_pci.c         |  2 +-
5 files changed, 34 insertions(+), 35 deletions(-)
[PATCH for-6.0 v2 0/4] spapr: Perform hotplug sanity checks at pre-plug
Posted by Greg Kurz 3 years, 5 months ago
Igor recently suggested that instead of failing in spapr_drc_attach()
at plug time we should rather check that the DRC is attachable at
pre-plug time. This allows to error out before the hot-plugged device
is even realized and to come up with simpler plug callbacks.

sPAPR currently supports hotplug of PCI devices, PHBs, CPU cores,
PC-DIMM/NVDIMM memory and TPM proxy devices. Some of these already
do sanity checks at pre-plug that are sufficient to ensure the DRC
are attachables. Some others don't even have a pre-plug handler.

This series adds the missing pieces so that all failing conditions
are caught at pre-plug time instead of plug time for all devices.

v2: - hopefully less fragile way of setting compat mode for hot-plugged
      CPUs

Greg Kurz (4):
  spapr: Fix pre-2.10 dummy ICP hack
  spapr: Abort if ppc_set_compat() fails for hot-plugged CPUs
  spapr: Simplify error path of spapr_core_plug()
  spapr: spapr_drc_attach() cannot fail

 include/hw/ppc/spapr_drc.h |  8 ++++++-
 hw/ppc/spapr.c             | 49 ++++++++++++++++++--------------------
 hw/ppc/spapr_drc.c         |  8 ++-----
 hw/ppc/spapr_nvdimm.c      |  2 +-
 hw/ppc/spapr_pci.c         |  2 +-
 5 files changed, 34 insertions(+), 35 deletions(-)

-- 
2.26.2



Re: [PATCH for-6.0 v2 0/4] spapr: Perform hotplug sanity checks at pre-plug
Posted by David Gibson 3 years, 5 months ago
On Tue, Dec 01, 2020 at 12:37:24PM +0100, Greg Kurz wrote:
> Igor recently suggested that instead of failing in spapr_drc_attach()
> at plug time we should rather check that the DRC is attachable at
> pre-plug time. This allows to error out before the hot-plugged device
> is even realized and to come up with simpler plug callbacks.
> 
> sPAPR currently supports hotplug of PCI devices, PHBs, CPU cores,
> PC-DIMM/NVDIMM memory and TPM proxy devices. Some of these already
> do sanity checks at pre-plug that are sufficient to ensure the DRC
> are attachables. Some others don't even have a pre-plug handler.
> 
> This series adds the missing pieces so that all failing conditions
> are caught at pre-plug time instead of plug time for all devices.
> 
> v2: - hopefully less fragile way of setting compat mode for hot-plugged
>       CPUs

Applied to ppc-for-6.0, thanks.

> 
> Greg Kurz (4):
>   spapr: Fix pre-2.10 dummy ICP hack
>   spapr: Abort if ppc_set_compat() fails for hot-plugged CPUs
>   spapr: Simplify error path of spapr_core_plug()
>   spapr: spapr_drc_attach() cannot fail
> 
>  include/hw/ppc/spapr_drc.h |  8 ++++++-
>  hw/ppc/spapr.c             | 49 ++++++++++++++++++--------------------
>  hw/ppc/spapr_drc.c         |  8 ++-----
>  hw/ppc/spapr_nvdimm.c      |  2 +-
>  hw/ppc/spapr_pci.c         |  2 +-
>  5 files changed, 34 insertions(+), 35 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