HV: store a pointer to pdev instead to save memory.

As we store the physical pci device info in a global pdev array, the vdev struct can
store a pointer to pdev instead.

Tracked-On: #2431
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
dongshen
2019-01-24 18:52:34 -08:00
committed by ACRN System Integration
parent 6ba07e64b9
commit f4adb109de
9 changed files with 46 additions and 69 deletions

View File

@@ -91,7 +91,10 @@ struct pci_vdev {
/* The bus/device/function triple of the virtual PCI device. */
union pci_bdf vbdf;
struct pci_pdev pdev;
/* The bus/device/function triple of the physical PCI device. */
union pci_bdf pbdf;
struct pci_pdev *pdev;
union pci_cfgdata cfgdata;