DM: release mmio data structure for pci bar

We didn't release mmio/io data structure related with PCI bar
of pci dev. Which could trigger memory leak when reboot UOS.

With the new patch, we release the mmio/io data structure
when pci core tries to deinit pci device.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>
This commit is contained in:
Yin Fengwei
2018-03-30 12:16:26 +08:00
committed by Jack Ren
parent 3726a0f7a5
commit f0b74016d1
2 changed files with 17 additions and 0 deletions

View File

@@ -230,6 +230,7 @@ int pci_emul_alloc_bar(struct pci_vdev *pdi, int idx,
int pci_emul_alloc_pbar(struct pci_vdev *pdi, int idx,
uint64_t hostbase, enum pcibar_type type,
uint64_t size);
void pci_emul_free_bars(struct pci_vdev *pdi);
int pci_emul_add_capability(struct pci_vdev *dev, u_char *capdata,
int caplen);
int pci_emul_add_msicap(struct pci_vdev *pi, int msgnum);