pcie_sriov: Ensure VF function number does not overflow
commit77718701157f6ca77ea7a57b536fa0a22f676082
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Thu, 27 Jun 2024 06:07:54 +0000 (27 15:07 +0900)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 3 Jul 2024 22:14:07 +0000 (3 18:14 -0400)
tree3dce0b19d3e760eb9adb5d07a8afcddc2c0a23fe
parentc613ad25125bf3016aa8f81ce170f5ac91d2379f
pcie_sriov: Ensure VF function number does not overflow

pci_new() aborts when creating a VF with a function number equals to or
is greater than PCI_DEVFN_MAX.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240627-reuse-v10-5-7ca0b8ed3d9f@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
docs/pcie_sriov.txt
hw/net/igb.c
hw/nvme/ctrl.c
hw/pci/pcie_sriov.c
include/hw/pci/pcie_sriov.h