HV: remove ptdev ops init in vm description

The ptdev ops will be initialized automatically during ptdev init, so
remove the hardcoded ops in vm_description.c

Tracked-On: #2431
Signed-off-by: Victor Sun <victor.sun@intel.com>
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Victor Sun
2019-01-18 01:34:26 +08:00
committed by ACRN System Integration
parent 69d883560a
commit 6ba07e64b9
3 changed files with 4 additions and 13 deletions

View File

@@ -107,12 +107,14 @@ static int32_t partition_mode_vpci_init(const struct acrn_vm *vm)
vdev = &vdev_array->vpci_vdev_list[i];
vdev->vpci = vpci;
/* Exclude hostbridge */
if (vdev->vbdf.value != 0U) {
partition_mode_pdev_init(vdev);
vdev->ops = &pci_ops_vdev_pt;
} else {
vdev->ops = &pci_ops_vdev_hostbridge;
}
if ((vdev->ops != NULL) && (vdev->ops->init != NULL)) {
if (vdev->ops->init != NULL) {
if (vdev->ops->init(vdev) != 0) {
pr_err("%s() failed at PCI device (bdf %x)!", __func__,
vdev->vbdf);