mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 15:14:27 +00:00
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:
committed by
ACRN System Integration
parent
983b717a61
commit
f082176df0
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user