qemu-e2k/hw/ppc
Greg Kurz 8251248394 spapr: reset DRCs after devices
A DRC with a pending unplug request releases its associated device at
machine reset time.

In the case of LMB, when all DRCs for a DIMM device have been reset,
the DIMM gets unplugged, causing guest memory to disappear. This may
be very confusing for anything still using this memory.

This is exactly what happens with vhost backends, and QEMU aborts
with:

qemu-system-ppc64: used ring relocated for ring 2
qemu-system-ppc64: qemu/hw/virtio/vhost.c:649: vhost_commit: Assertion
 `r >= 0' failed.

The issue is that each DRC registers a QEMU reset handler, and we
don't control the order in which these handlers are called (ie,
a LMB DRC will unplug a DIMM before the virtio device using the
memory on this DIMM could stop its vhost backend).

To avoid such situations, let's reset DRCs after all devices
have been reset.

Reported-by: Mallesh N. Koti <mallesh@linux.vnet.ibm.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-11-20 10:10:56 +11:00
..
e500-ccsr.h
e500.c e500: ppce500_init_mpic() return device instead of IRQ array 2017-11-08 13:21:37 +11:00
e500.h
e500plat.c ppc: mpc8544ds/e500plat: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
fdt.c
mac_newworld.c ppc: mac_newworld: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
mac_oldworld.c ppc: mac_oldworld: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
mac.h macio: use object link between MACIO_IDE and MAC_DBDMA object 2017-09-27 13:05:41 +10:00
Makefile.objs
mpc8544_guts.c
mpc8544ds.c ppc: mpc8544ds/e500plat: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
pnv_bmc.c
pnv_core.c ppc: pnv: drop PnvChipClass::cpu_model field 2017-10-17 10:34:01 +11:00
pnv_lpc.c
pnv_occ.c
pnv_psi.c
pnv_xscom.c
pnv.c ppc: pnv: consolidate type definitions and batch register them 2017-10-17 10:34:01 +11:00
ppc4xx_devs.c ppc: replace cpu_model with cpu_type on ref405ep,taihu boards 2017-10-17 10:34:00 +11:00
ppc4xx_pci.c pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
ppc405_boards.c
ppc405_uc.c ppc: replace cpu_model with cpu_type on ref405ep,taihu boards 2017-10-17 10:34:00 +11:00
ppc405.h
ppc440_bamboo.c ppc: bamboo: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
ppc_booke.c
ppc.c ppc: spapr: replace ppc_cpu_parse_features() with cpu_parse_cpu_model() 2017-10-17 10:34:00 +11:00
ppce500_spin.c
prep_systemio.c
prep.c ppc: 40p/prep: replace cpu_model with cpu_type 2017-10-17 10:34:00 +11:00
rs6000_mc.c
spapr_cpu_core.c spapr_cpu_core: rewrite machine type sanity check 2017-10-17 10:34:01 +11:00
spapr_drc.c spapr: reset DRCs after devices 2017-11-20 10:10:56 +11:00
spapr_events.c spapr_events: use QTAILQ_FOREACH_SAFE() in spapr_clear_pending_events() 2017-09-15 10:29:48 +10:00
spapr_hcall.c target/ppc: correct htab shift for hash on radix 2017-11-14 10:28:32 +11:00
spapr_iommu.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
spapr_ovec.c
spapr_pci_vfio.c
spapr_pci.c spapr_pci: fail gracefully with non-pseries machine types 2017-10-17 10:34:01 +11:00
spapr_rng.c
spapr_rtas_ddw.c
spapr_rtas.c
spapr_rtc.c
spapr_vio.c
spapr.c spapr: reset DRCs after devices 2017-11-20 10:10:56 +11:00
trace-events
virtex_ml507.c ppc: virtex-ml507: replace cpu_model with cpu_type 2017-10-17 10:34:00 +11:00