ppc: Skip partially initialized vCPUs in 'info pic'
commit0a83b47055246d3942084f03fc54731c4fb9b731
authorGreg Kurz <groug@kaod.org>
Thu, 24 Oct 2019 14:27:33 +0000 (24 16:27 +0200)
committerLaurent Vivier <lvivier@redhat.com>
Mon, 18 Nov 2019 10:50:25 +0000 (18 11:50 +0100)
tree15a0f96fe9cac621b126b962c1f8c5ea7089e225
parent35886de140b7ff781b775d2da5e7475e8a8cb4c6
ppc: Skip partially initialized vCPUs in 'info pic'

CPU_FOREACH() can race with vCPU hotplug/unplug on sPAPR machines, ie.
we may try to print out info about a vCPU with a NULL presenter pointer.

Check that in order to prevent QEMU from crashing.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <157192725327.3146912.12047076483178652551.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
hw/intc/xics.c
hw/intc/xive.c