mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
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:
committed by
ACRN System Integration
parent
6ba07e64b9
commit
f4adb109de
@@ -179,7 +179,7 @@ struct pci_pdev {
|
||||
struct pci_msix_cap msix;
|
||||
};
|
||||
|
||||
typedef void (*pci_pdev_enumeration_cb)(const struct pci_pdev *pdev, const void *data);
|
||||
typedef void (*pci_pdev_enumeration_cb)(struct pci_pdev *pdev, const void *data);
|
||||
|
||||
static inline uint32_t pci_bar_offset(uint32_t idx)
|
||||
{
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user