[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 32/53] spapr/xive: skip partially initialized vCPUs in presenter
From: |
David Gibson |
Subject: |
[PULL 32/53] spapr/xive: skip partially initialized vCPUs in presenter |
Date: |
Fri, 4 Oct 2019 19:37:26 +1000 |
From: Cédric Le Goater <address@hidden>
When vCPUs are hotplugged, they are added to the QEMU CPU list before
being fully realized. This can crash the XIVE presenter because the
'tctx' pointer is not necessarily initialized when looking for a
matching target.
These vCPUs are not valid targets for the presenter. Skip them.
Signed-off-by: Cédric Le Goater <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
---
hw/intc/xive.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/intc/xive.c b/hw/intc/xive.c
index b7417210d8..29df06df11 100644
--- a/hw/intc/xive.c
+++ b/hw/intc/xive.c
@@ -1396,6 +1396,14 @@ static bool xive_presenter_match(XiveRouter *xrtr,
uint8_t format,
XiveTCTX *tctx = xive_router_get_tctx(xrtr, cs);
int ring;
+ /*
+ * Skip partially initialized vCPUs. This can happen when
+ * vCPUs are hotplugged.
+ */
+ if (!tctx) {
+ continue;
+ }
+
/*
* HW checks that the CPU is enabled in the Physical Thread
* Enable Register (PTER).
--
2.21.0
- [PULL 16/53] spapr: Move handling of special NVLink numa node from reset to init, (continued)
- [PULL 16/53] spapr: Move handling of special NVLink numa node from reset to init, David Gibson, 2019/10/04
- [PULL 20/53] spapr: Stop providing RTAS blob, David Gibson, 2019/10/04
- [PULL 21/53] pseries: Update SLOF firmware image, David Gibson, 2019/10/04
- [PULL 26/53] target/ppc: change struct PPC_DFP decimal storage from uint64[2] to ppc_vsr_t, David Gibson, 2019/10/04
- [PULL 18/53] spapr: Skip leading zeroes from memory@ DT node names, David Gibson, 2019/10/04
- [PULL 15/53] spapr: Simplify handling of pre ISA 3.0 guest workaround handling, David Gibson, 2019/10/04
- [PULL 17/53] spapr: Fixes a leak in CAS, David Gibson, 2019/10/04
- [PULL 19/53] spapr: Do not put empty properties for -kernel/-initrd/-append, David Gibson, 2019/10/04
- [PULL 28/53] target/ppc: remove unnecessary if() around calls to set_dfp{64, 128}() in DFP macros, David Gibson, 2019/10/04
- [PULL 31/53] target/ppc: use Vsr macros in BCD helpers, David Gibson, 2019/10/04
- [PULL 32/53] spapr/xive: skip partially initialized vCPUs in presenter,
David Gibson <=
- [PULL 25/53] target/ppc: introduce dfp_finalize_decimal{64, 128}() helper functions, David Gibson, 2019/10/04
- [PULL 22/53] target/ppc: introduce get_dfp{64, 128}() helper functions, David Gibson, 2019/10/04
- [PULL 29/53] spapr-pci: Stop providing assigned-addresses, David Gibson, 2019/10/04
- [PULL 23/53] target/ppc: introduce set_dfp{64, 128}() helper functions, David Gibson, 2019/10/04
- [PULL 30/53] spapr: Render full FDT on ibm, client-architecture-support, David Gibson, 2019/10/04
- [PULL 27/53] target/ppc: use existing VsrD() macro to eliminate HI_IDX and LO_IDX from dfp_helper.c, David Gibson, 2019/10/04
- [PULL 33/53] xics: Minor fixes for XICSFabric interface, David Gibson, 2019/10/04
- [PULL 34/53] xics: Eliminate 'reject', 'resend' and 'eoi' class hooks, David Gibson, 2019/10/04
- [PULL 38/53] xics: Create sPAPR specific ICS subtype, David Gibson, 2019/10/04
- [PULL 35/53] xics: Rename misleading ics_simple_*() functions, David Gibson, 2019/10/04