hv: refine vpci_init_vdev function

Add a new parameter pf_vdev for function vpci_init_vdev to support SRIOV
VF vdev initializaiton.

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yuan Liu
2020-02-29 10:53:40 +08:00
committed by wenlingz
parent 320ed6c238
commit 176cb31c31
2 changed files with 22 additions and 3 deletions

View File

@@ -112,6 +112,9 @@ struct pci_vdev {
struct pci_msix msix;
struct pci_cap_sriov sriov;
/* Pointer to the SRIOV VF associated PF's vdev */
struct pci_vdev *phyfun;
/* Pointer to corresponding PCI device's vm_config */
struct acrn_vm_pci_dev_config *pci_dev_config;
@@ -149,5 +152,6 @@ struct pci_vdev *pci_find_vdev(struct acrn_vpci *vpci, union pci_bdf vbdf);
struct acrn_assign_pcidev;
int32_t vpci_assign_pcidev(struct acrn_vm *tgt_vm, struct acrn_assign_pcidev *pcidev);
int32_t vpci_deassign_pcidev(struct acrn_vm *tgt_vm, struct acrn_assign_pcidev *pcidev);
struct pci_vdev *vpci_init_vdev(struct acrn_vpci *vpci, struct acrn_vm_pci_dev_config *dev_config, struct pci_vdev *parent_pf_vdev);
#endif /* VPCI_H_ */