qemu/hw/pci
Akihiko Odaki a5745ac183 hw/pci: Fix SR-IOV VF number calculation
pci_config_get_bar_addr() had a division by vf_stride. vf_stride needs
to be non-zero when there are multiple VFs, but the specification does
not prohibit to make it zero when there is only one VF.

Do not perform the division for the first VF to avoid division by zero.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20250314-sriov-v9-2-57dae8ae3ab5@daynix.com>
Tested-by: Yui Washizu <yui.washidu@gmail.com>
Tested-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-05-14 05:39:14 -04:00
..
Kconfig kconfig: Add PCIe devices to s390x machines 2023-07-14 11:10:57 +02:00
meson.build meson: remove CONFIG_ALL 2023-12-31 09:11:28 +01:00
msi.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
msix.c hw/pci/msix: Warn on PBA writes 2025-02-21 07:18:03 -05:00
pci_bridge.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pci_host.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pci-hmp-cmds.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
pci-internal.h hw/pci/aer: Make PCIE AER error injection facility available for other emulation to use. 2023-03-07 12:39:00 -05:00
pci-qmp-cmds.c pci: Move QMP commands to new hw/pci/pci-qmp-cmds.c 2022-12-19 16:15:17 +01:00
pci-stub.c hw/pci: remove return after g_assert_not_reached() 2024-09-24 13:53:35 +02:00
pci.c hw/pci: Fix SR-IOV VF number calculation 2025-05-14 05:39:14 -04:00
pcie_aer.c hw/pci: Constify VMState 2023-12-30 07:38:06 +11:00
pcie_doe.c hw/pci: PCIe Data Object Exchange emulation 2022-11-07 13:12:19 -05:00
pcie_host.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
pcie_port.c hw/pci/pcie_port: Fix pcie_slot_is_hotpluggbale_bus typo 2025-05-08 14:22:12 +02:00
pcie_sriov.c pcie_sriov: Register VFs after migration 2025-02-20 18:23:19 -05:00
pcie.c pci: ensure valid link status bits for downstream ports 2025-01-15 13:05:33 -05:00
shpc.c hw/pci: add some convenient trace-events for pcie and shpc hotplug 2024-03-11 22:09:42 +01:00
slotid_cap.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
trace-events hw/pci: Basic support for PCI power management 2025-03-06 06:47:33 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00