qemu-e2k/hw/pci
Julia Suvorova 0dabc0f654 hw/pci/pcie: Move hot plug capability check to pre_plug callback
Check for hot plug capability earlier to avoid removing devices attached
during the initialization process.

Run qemu with an unattached drive:
  -drive file=$FILE,if=none,id=drive0 \
  -device pcie-root-port,id=rp0,slot=3,bus=pcie.0,hotplug=off
Hotplug a block device:
  device_add virtio-blk-pci,id=blk0,drive=drive0,bus=rp0
If hotplug fails on plug_cb, drive0 will be deleted.

Fixes: 0501e1aa1d ("hw/pci/pcie: Forbid hot-plug if it's disabled on the slot")

Acked-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Julia Suvorova <jusual@redhat.com>
Message-Id: <20200604125947.881210-1-jusual@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2020-06-09 14:18:04 -04:00
..
Kconfig
Makefile.objs
msi.c
msix.c msix: allow qword MSI-X table accesses 2020-06-09 09:31:34 -04:00
pci_bridge.c
pci_host.c hw/pci/pci_host: Let pci_data_[read/write] use unsigned 'size' argument 2020-01-05 07:03:03 -05:00
pci-stub.c pci-stub: add more MSI functions 2019-12-17 19:33:49 +01:00
pci.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
pcie_aer.c
pcie_host.c
pcie_port.c pcie_root_port: Add hotplug disabling option 2020-03-08 09:18:29 -04:00
pcie.c hw/pci/pcie: Move hot plug capability check to pre_plug callback 2020-06-09 14:18:04 -04:00
shpc.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
slotid_cap.c
trace-events