]> git.ipfire.org Git - thirdparty/qemu.git/commit
pcie_sriov: Allow user to create SR-IOV device
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Fri, 14 Mar 2025 06:14:54 +0000 (15:14 +0900)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 14 May 2025 09:39:14 +0000 (05:39 -0400)
commit19e55471d4e8a494cfda7470e701829e3a873bdc
treed91d391086406b509cc8f42d5aee3c44d746e444
parentd2f5bb7849e463646173564fdadf40e32a32bf6e
pcie_sriov: Allow user to create SR-IOV device

A user can create a SR-IOV device by specifying the PF with the
sriov-pf property of the VFs. The VFs must be added before the PF.

A user-creatable VF must have PCIDeviceClass::sriov_vf_user_creatable
set. Such a VF cannot refer to the PF because it is created before the
PF.

A PF that user-creatable VFs can be attached calls
pcie_sriov_pf_init_from_user_created_vfs() during realization and
pcie_sriov_pf_exit() when exiting.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20250314-sriov-v9-5-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>
hw/pci/pci.c
hw/pci/pcie_sriov.c
include/hw/pci/pci_device.h
include/hw/pci/pcie_sriov.h