Skip to content

Commit 70625f0

Browse files
chejianjjren1
authored andcommitted
dm: export pci_emul_add_capability
pci_emul_add_capability is needed by virtio 1.0 framework to add pci vendor capability from outside of pci core. Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Reviewed-by: Hao Li <hao.l.li@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent f1e801d commit 70625f0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

devicemodel/hw/pci/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ pci_emul_alloc_pbar(struct pci_vdev *pdi, int idx, uint64_t hostbase,
666666
}
667667

668668
#define CAP_START_OFFSET 0x40
669-
static int
669+
int
670670
pci_emul_add_capability(struct pci_vdev *dev, u_char *capdata, int caplen)
671671
{
672672
int i, capoff, reallen;

devicemodel/include/pci_core.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ int pci_emul_alloc_bar(struct pci_vdev *pdi, int idx,
230230
int pci_emul_alloc_pbar(struct pci_vdev *pdi, int idx,
231231
uint64_t hostbase, enum pcibar_type type,
232232
uint64_t size);
233+
int pci_emul_add_capability(struct pci_vdev *dev, u_char *capdata,
234+
int caplen);
233235
int pci_emul_add_msicap(struct pci_vdev *pi, int msgnum);
234236
int pci_emul_add_pciecap(struct pci_vdev *pi, int pcie_device_type);
235237
void pci_generate_msi(struct pci_vdev *pi, int msgnum);

0 commit comments

Comments
 (0)