HV: init ptdev bar during runtime for partition mode

Current pt devices bar info for partion mode is hardcoded in
vm_description.c, now we remove the hardcoded info and parse the bar
info during pt devices init.

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-15 15:28:40 +08:00
committed by ACRN System Integration
parent 983b717a61
commit f082176df0
3 changed files with 65 additions and 0 deletions

View File

@@ -401,3 +401,17 @@ void pci_pdev_foreach(pci_pdev_enumeration_cb cb_func, const void *ctx)
}
}
struct pci_pdev *find_pci_pdev(union pci_bdf pbdf)
{
struct pci_pdev *pdev = NULL;
uint32_t i;
for (i = 0U; i < num_pci_pdev; i++) {
if (pci_pdev_array[i].bdf.value == pbdf.value) {
pdev = &pci_pdev_array[i];
break;
}
}
return pdev;
}