qemu/include/hw
David Gibson 307b7715d0 spapr: Eliminate DRC 'signalled' state variable
The 'signalled' field in the DRC appears to be entirely a torturous
workaround for the fact that PCI devices were started in UNISOLATED state
for unclear reasons.

1) 'signalled' is already meaningless for logical (so far, all non PCI)
DRCs.  It's always set to true (at least at any point it might be tested),
and can't be assigned any real meaning due to the way signalling works for
logical DRCs.

2) For PCI DRCs, the only time signalled would be false is when non-zero
functions of a multifunction device are hotplugged, followed by function
zero (the other way around is explicitly not permitted). In that case the
secondary function DRCs are attached, but the notification isn't sent to
the guest until function 0 is plugged.

3) signalled being false is used to allow a DRC detach to switch mode
back to ISOLATED state, which allows a secondary function to be hotplugged
then unplugged with function 0 never inserted.  Without this a secondary
function starting in UNISOLATED state couldn't be detached again without
function 0 being inserted, all the functions configured by the guest, then
sent back to ISOLATED state.

4) But now that PCI DRCs start in ISOLATED state, there's nothing to be
done.  If the guest doesn't get the notification, it won't switch the
device to UNISOLATED state, so nothing prevents it from being unplugged.
If the guest does move it to UNISOLATED state without the signal (due to
a manual drmgr call, for instance) then it really isn't safe to unplug it.

So, this patch removes the signalled variable and all code related to it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2017-06-30 14:03:32 +10:00
..
acpi migration: Remove unneeded includes of migration/vmstate.h 2017-06-01 18:49:22 +02:00
adc
arm hw/arm/exynos: Move DRAM initialization next boards 2017-06-13 14:56:57 +01:00
audio audio: Rename hw/audio/audio.h to hw/audio/soundhw.h 2017-05-19 10:48:54 +02:00
block hw/block: Introduce share-rw qdev property 2017-02-28 20:40:36 +01:00
char char: move CharBackend handling in char-fe unit 2017-06-02 11:33:53 +04:00
core
cpu
cris char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
display
dma include: Fix typos found by codespell 2017-01-24 23:26:52 +03:00
gpio bcm2835_gpio: add bcm2835 gpio controller 2017-02-28 17:10:00 +00:00
i2c i2c: Allow I2C devices to NAK start events 2017-01-09 11:40:20 +00:00
i386 q35/mch: implement extended TSEG sizes 2017-06-16 18:07:08 +03:00
ide ide: core: add cleanup function 2017-03-15 20:50:14 -04:00
input ps2: add and use PS2State typedef 2017-06-23 11:51:50 +02:00
intc hw/intc/arm_gicv3_its: Implement state save/restore 2017-06-13 14:57:00 +01:00
ipack
ipmi ipmi: introduce an ipmi_bmc_gen_event() API 2017-04-26 12:41:55 +10:00
isa isa: use get_uint() for "io-base" 2017-06-20 14:31:32 +02:00
kvm
lm32
m68k hw/char/mcf_uart: QOMify the ColdFire UART 2017-02-16 14:06:56 +01:00
mem nvdimm acpi: rename nvdimm_acpi_hotplug 2016-11-15 17:20:37 +02:00
mips hw/mips: add missing include 2017-06-04 18:42:55 +03:00
misc introduce mmio_interface 2017-06-27 15:09:15 +02:00
net net/ftgmac100: add a 'aspeed' property 2017-04-25 19:17:25 +08:00
nvram fw-cfg: turn FW_CFG_FILE_SLOTS into a device property 2017-01-18 22:59:53 +02:00
pci migration: Remove unneeded includes of migration/vmstate.h 2017-06-01 18:49:22 +02:00
pci-host q35/mch: implement extended TSEG sizes 2017-06-16 18:07:08 +03:00
ppc spapr: Eliminate DRC 'signalled' state variable 2017-06-30 14:03:32 +10:00
s390x s390x/css: fence off MIDA 2017-06-06 10:17:11 +02:00
scsi hw: Deprecate -drive if=scsi with non-onboard HBAs 2017-02-21 13:17:45 +01:00
sd hw/sd: add card-reparenting function 2017-02-28 17:10:00 +00:00
sh4 char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
smbios smbios: filter based on CONFIG_SMBIOS rather than TARGET 2017-01-16 17:52:34 +01:00
sparc char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
ssi aspeed/smc: handle SPI flash Command mode 2017-01-20 11:15:08 +00:00
timer qtest: add rtc periodic timer test 2017-06-06 20:18:35 +02:00
tricore
unicore32
usb
vfio vfio/ccw: vfio based subchannel passthrough driver 2017-05-19 12:29:01 +02:00
virtio vhost-user-scsi: Introduce vhost-user-scsi host device 2017-06-15 11:18:40 +02:00
watchdog wdt: Add Aspeed watchdog device model 2017-02-07 18:29:59 +00:00
xen xen/9pfs: build and register Xen 9pfs backend 2017-04-25 11:04:33 -07:00
boards.h machine: call machine init from wrapper 2017-05-11 16:08:50 -03:00
bt.h char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
compat.h migration: move skip_section_footers 2017-06-28 11:18:39 +02:00
devices.h sm501: QOMify 2017-04-24 12:32:12 +01:00
elf_ops.h elf-loader: Allow late loading of elf 2017-02-28 12:04:48 +01:00
empty_slot.h
fw-path-provider.h
hotplug.h qdev: hotplug: drop HotplugHandler.post_plug callback 2016-11-15 17:20:37 +02:00
hw.h migration: Split qemu-file.h 2017-06-01 18:49:22 +02:00
ide.h xen-platform: add missing disk unplug option 2017-01-27 15:23:29 -08:00
irq.h
loader-fit.h loader: Support Flattened Image Trees (FIT images) 2017-02-21 23:47:40 +00:00
loader.h elf-loader: Allow late loading of elf 2017-02-28 12:04:48 +01:00
nmi.h
or-irq.h
pcmcia.h
platform-bus.h
ptimer.h tests: fix ptimer leaks 2017-03-01 00:09:28 +04:00
qdev-core.h qdev: avoid type casts between signed and unsigned 2017-06-20 14:31:32 +02:00
qdev-dma.h
qdev-properties.h accel: introduce AccelClass.global_props 2017-06-28 11:18:38 +02:00
qdev.h
register.h hw/registerfields.h: Pull FIELD etc macros out of hw/register.h 2017-01-27 15:20:21 +00:00
registerfields.h hw/registerfields.h: Pull FIELD etc macros out of hw/register.h 2017-01-27 15:20:21 +00:00
stream.h
sysbus.h
usb.h usb: replace handle_destroy with unrealize 2017-02-23 15:40:19 +01:00