aboutsummaryrefslogtreecommitdiff
path: root/hw/pci/pci.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-02-25 14:02:16 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-02-25 14:02:16 +0000
commit51db2d7cf26d05a961ec0ee0eb773594b32cc4a1 (patch)
tree2bdad129429d651838188b950f620604b528be31 /hw/pci/pci.c
parent7ef8134565dccf9186d5eabd7dbb4ecae6dead87 (diff)
parent7b630d937a6c73fb145746fb31e0fb4b08f0cf0e (diff)
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc,virtio,pci: fixes, tests Fixes all over the place, a new test. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Tue 23 Feb 2021 16:00:29 GMT # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: qtest/acpi/bios-tables-test: update acpi tables acpi: add test case for -no-hpet i386: acpi: Don't build HPET ACPI entry if HPET is disabled hw/i386: declare ACPI mother board resource for MMCONFIG region acpi: add test case for smm unsupported -machine smm=off acpi: set fadt.smi_cmd to zero when SMM is not supported acpi/core: always set SCI_EN when SMM isn't supported ich9, piix4: add property, smm-compat, to keep compatibility of SMM qtest: update tests/qtest/bios-tables-test-allowed-diff.h checkpatch: don't emit warning on newly created acpi data files tests/data/acpi/virt/DSDT.pxb: update with _CCA acpi/gpex: Fix cca attribute check for pxb device acpi: Allow pxb DSDT acpi table changes pcie: don't set link state active if the slot is empty failover: really display a warning when the primary device is not found virtio-net: add missing object_unref() pci: cleanup failover sanity check Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/pci/pci.c')
-rw-r--r--hw/pci/pci.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index a9ebef8a35..fa97a671d1 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2127,10 +2127,8 @@ static void pci_qdev_realize(DeviceState *qdev, Error **errp)
pci_qdev_unrealize(DEVICE(pci_dev));
return;
}
- if (!(pci_dev->cap_present & QEMU_PCI_CAP_MULTIFUNCTION)
- && (PCI_FUNC(pci_dev->devfn) == 0)) {
- qdev->allow_unplug_during_migration = true;
- } else {
+ if ((pci_dev->cap_present & QEMU_PCI_CAP_MULTIFUNCTION)
+ || (PCI_FUNC(pci_dev->devfn) != 0)) {
error_setg(errp, "failover: primary device must be in its own "
"PCI slot");
pci_qdev_unrealize(DEVICE(pci_dev));