[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 81/88] hw/ppc/spapr_pci: Do not reject VFs created after a PF
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 81/88] hw/ppc/spapr_pci: Do not reject VFs created after a PF |
Date: |
Tue, 2 Jul 2024 16:20:33 -0400 |
From: Akihiko Odaki <akihiko.odaki@daynix.com>
A PF may automatically create VFs and the PF may be function 0.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240627-reuse-v10-3-7ca0b8ed3d9f@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/ppc/spapr_pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index f63182a03c..ed4454bbf7 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -1573,7 +1573,9 @@ static void spapr_pci_pre_plug(HotplugHandler
*plug_handler,
* hotplug, we do not allow functions to be hotplugged to a
* slot that already has function 0 present
*/
- if (plugged_dev->hotplugged && bus->devices[PCI_DEVFN(slotnr, 0)] &&
+ if (plugged_dev->hotplugged &&
+ !pci_is_vf(pdev) &&
+ bus->devices[PCI_DEVFN(slotnr, 0)] &&
PCI_FUNC(pdev->devfn) != 0) {
error_setg(errp, "PCI: slot %d function 0 already occupied by %s,"
" additional functions can no longer be exposed to guest.",
--
MST
- [PULL v2 77/88] virtio: remove virtio_tswap16s() call in vring_packed_event_read(), (continued)
- [PULL v2 77/88] virtio: remove virtio_tswap16s() call in vring_packed_event_read(), Michael S. Tsirkin, 2024/07/02
- [PULL v2 75/88] hw/cxl/events: Improve QMP interfaces and documentation for add/release dynamic capacity., Michael S. Tsirkin, 2024/07/02
- [PULL v2 78/88] virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged, Michael S. Tsirkin, 2024/07/02
- [PULL v2 80/88] hw/ppc/spapr_pci: Do not create DT for disabled PCI device, Michael S. Tsirkin, 2024/07/02
- [PULL v2 79/88] hw/pci: Rename has_power to enabled, Michael S. Tsirkin, 2024/07/02
- [PULL v2 85/88] pcie_sriov: Release VFs failed to realize, Michael S. Tsirkin, 2024/07/02
- [PULL v2 82/88] pcie_sriov: Do not manually unrealize, Michael S. Tsirkin, 2024/07/02
- [PULL v2 83/88] pcie_sriov: Ensure VF function number does not overflow, Michael S. Tsirkin, 2024/07/02
- [PULL v2 84/88] pcie_sriov: Reuse SR-IOV VF device instances, Michael S. Tsirkin, 2024/07/02
- [PULL v2 87/88] pcie_sriov: Register VFs after migration, Michael S. Tsirkin, 2024/07/02
- [PULL v2 81/88] hw/ppc/spapr_pci: Do not reject VFs created after a PF,
Michael S. Tsirkin <=
- [PULL v2 86/88] pcie_sriov: Remove num_vfs from PCIESriovPF, Michael S. Tsirkin, 2024/07/02
- [PULL v2 88/88] hw/pci: Replace -1 with UINT32_MAX for romsize, Michael S. Tsirkin, 2024/07/02
- Re: [PULL v2 00/88] virtio: features,fixes, Richard Henderson, 2024/07/03
- Re: [PULL v2 00/88] virtio: features,fixes, Michael S. Tsirkin, 2024/07/03
- Re: [PULL v2 00/88] virtio: features,fixes, Richard Henderson, 2024/07/03
- Re: [PULL v2 00/88] virtio: features,fixes, Thomas Huth, 2024/07/03
- Re: [PULL v2 00/88] virtio: features,fixes, Michael S. Tsirkin, 2024/07/03
- Re: [PULL v2 00/88] virtio: features,fixes, Michael S. Tsirkin, 2024/07/03
- Re: [PULL v2 00/88] virtio: features,fixes, Thomas Huth, 2024/07/04
- Re: [PULL v2 00/88] virtio: features,fixes, Michael S. Tsirkin, 2024/07/03