qemu-e2k/hw/ppc
Michael Roth f40eb921da spapr_drc: enable immediate detach for unsignalled devices
Currently spapr doesn't support "aborting" hotplug of PCI
devices by allowing device_del to immediately remove the
device if we haven't signalled the presence of the device
to the guest.

In the past this wasn't an issue, since we always immediately
signalled device attach and simply relied on full guest-aware
add->remove path for device removal. However, as of 788d259,
we now defer signalling for PCI functions until function 0
is attached, so now we need to deal with these "abort" operations
for cases where a user hotplugs a non-0 function, then opts to
remove it prior hotplugging function 0. Currently they'd have to
reboot before the unplug completed. PCIe multifunction hotplug
does not have this requirement however, so from a management
implementation perspective it would be good to address this within
the same release as 788d259.

We accomplish this by simply adding a 'signalled' flag to track
whether a device hotplug event has been sent to the guest. If it
hasn't, we allow immediate removal under the assumption that the
guest will not be using the device. Devices present at boot/reset
time are also assumed to be 'signalled'.

For CPU/memory/etc, signalling will still happen immediately
as part of device_add, so only PCI functions should be affected.

Cc: bharata@linux.vnet.ibm.com
Cc: david@gibson.dropbear.id.au
Cc: sbhat@linux.vnet.ibm.com
Cc: qemu-ppc@nongnu.org
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
[dwg: This fixes a regression where an incorrect hot-add of a non-zero
      function can no longer be backed out until function 0 is added]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-04-05 10:47:03 +10:00
..
e500-ccsr.h ppc: do not use ../ in include files 2013-03-01 13:57:33 +01:00
e500.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
e500.h PPC: e500 pci host: Add support for ATMUs 2015-01-07 16:16:24 +01:00
e500plat.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
mac_newworld.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
mac_oldworld.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
mac.h cuda: port SET_DEVICE_LIST command to new framework 2016-02-17 09:59:30 +11:00
Makefile.objs ppc/spapr: Implement H_RANDOM hypercall in QEMU 2015-09-23 10:51:11 +10:00
mpc8544_guts.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
mpc8544ds.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppc4xx_devs.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppc4xx_pci.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppc405_boards.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
ppc405_uc.c Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND 2016-03-22 22:20:17 +01:00
ppc405.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
ppc440_bamboo.c loader: Add data swap option to load-elf 2016-03-04 11:30:21 +00:00
ppc_booke.c Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND 2016-03-22 22:20:17 +01:00
ppc.c Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND 2016-03-22 22:20:17 +01:00
ppce500_spin.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
prep.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
spapr_drc.c spapr_drc: enable immediate detach for unsignalled devices 2016-04-05 10:47:03 +10:00
spapr_events.c spapr_drc: enable immediate detach for unsignalled devices 2016-04-05 10:47:03 +10:00
spapr_hcall.c ppc: Rework POWER7 & POWER8 exception model 2016-04-05 10:38:24 +10:00
spapr_iommu.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
spapr_pci_vfio.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
spapr_pci.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
spapr_rng.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
spapr_rtas.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
spapr_rtc.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
spapr_vio.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
spapr.c * Log filtering from Alex and Peter 2016-03-24 21:42:40 +00:00
virtex_ml507.c loader: Add data swap option to load-elf 2016-03-04 11:30:21 +00:00