diff --git a/hypervisor/include/dm/pci.h b/hypervisor/include/dm/pci.h index cf6f66e38..65b60ecd5 100644 --- a/hypervisor/include/dm/pci.h +++ b/hypervisor/include/dm/pci.h @@ -138,6 +138,21 @@ enum pci_bar_type { PCIBAR_MEM64, }; +struct pci_bar { + uint64_t base; + uint64_t size; + enum pci_bar_type type; +}; + +struct pci_pdev { + /* The bar info of the physical PCI device. */ + struct pci_bar bar[PCI_BAR_COUNT]; + + /* The bus/device/function triple of the physical PCI device. */ + union pci_bdf bdf; +}; + + typedef void (*pci_enumeration_cb)(uint16_t pbdf, const void *data); static inline uint32_t pci_bar_offset(uint32_t idx) diff --git a/hypervisor/include/dm/vpci.h b/hypervisor/include/dm/vpci.h index 61b8a711c..aadd71b8b 100644 --- a/hypervisor/include/dm/vpci.h +++ b/hypervisor/include/dm/vpci.h @@ -45,26 +45,12 @@ struct pci_vdev_ops { uint32_t bytes, uint32_t *val); }; -struct pci_bar { - uint64_t base; - uint64_t size; - enum pci_bar_type type; -}; - struct msix_table_entry { uint64_t addr; uint32_t data; uint32_t vector_control; }; -struct pci_pdev { - /* The bar info of the physical PCI device. */ - struct pci_bar bar[PCI_BAR_COUNT]; - - /* The bus/device/function triple of the physical PCI device. */ - union pci_bdf bdf; -}; - /* MSI capability structure */ struct pci_msi { uint32_t capoff;