HV: remove the populate_msi_struct() function

Remove the populate_msi_struct() function, put msi initialization specific
functionality into msi.x, and put msix initialization specific functionality
into msix.c

Rename mmio_hva to mmio_hpa and change related code to fix misra c violation:
Cast from pointer to integral type. : (void* to unsigned long): ( uint64_t ) hpa2hva ( bar -> base )

Tracked-On: #2534
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
dongshen
2019-03-05 14:50:35 -08:00
committed by wenlingz
parent 3158c851ae
commit 562628b99e
5 changed files with 39 additions and 27 deletions

View File

@@ -71,14 +71,13 @@ static inline void pci_vdev_write_cfg_u32(struct pci_vdev *vdev, uint32_t offset
extern const struct vpci_ops partition_mode_vpci_ops;
#else
extern const struct vpci_ops sharing_mode_vpci_ops;
extern const struct pci_vdev_ops pci_ops_vdev_msi;
extern const struct pci_vdev_ops pci_ops_vdev_msix;
#endif
uint32_t pci_vdev_read_cfg(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes);
void pci_vdev_write_cfg(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t val);
void populate_msi_struct(struct pci_vdev *vdev);
void add_vdev_handler(struct pci_vdev *vdev, const struct pci_vdev_ops *ops);
struct pci_vdev *pci_find_vdev_by_vbdf(const struct acrn_vpci *vpci, union pci_bdf vbdf);