mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 01:37:44 +00:00
hv: add functions to initialize vmsix capability
- add 'vpci_add_capability()' to initialize one PCI capability in config space. - add 'add_vmsix_capability()' to add vmsix capability. Tracked-On: #5407 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Li, Fei <fei1.li@intel.com> Reviewed-by: Wang, Yu1 <yu1.wang@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -60,6 +60,14 @@ struct pci_msi {
|
||||
};
|
||||
|
||||
/* MSI-X capability structure */
|
||||
struct msixcap {
|
||||
uint8_t capid;
|
||||
uint8_t nextptr;
|
||||
uint16_t msgctrl;
|
||||
uint32_t table_info; /* bar index and offset */
|
||||
uint32_t pba_info; /* bar index and offset */
|
||||
} __packed;
|
||||
|
||||
struct pci_msix {
|
||||
struct msix_table_entry table_entries[CONFIG_MAX_MSIX_TABLE_NUM];
|
||||
uint64_t mmio_gpa;
|
||||
@@ -115,6 +123,9 @@ struct pci_vdev {
|
||||
uint32_t nr_bars; /* 6 for normal device, 2 for bridge, 1 for cardbus */
|
||||
struct pci_vbar vbars[PCI_BAR_COUNT];
|
||||
|
||||
uint8_t prev_capoff; /* Offset of previous vPCI capability */
|
||||
uint8_t free_capoff; /* Next free offset to add vPCI capability */
|
||||
|
||||
struct pci_msi msi;
|
||||
struct pci_msix msix;
|
||||
struct pci_cap_sriov sriov;
|
||||
|
Reference in New Issue
Block a user