mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 01:37:44 +00:00
hv: vpci: add each vdev_ops for each emulated PCI device
Add a field (vdev_ops) in struct acrn_vm_pci_dev_config to configure a PCI CFG operation for an emulated PCI device. Use pci_pt_dev_ops for PCI_DEV_TYPE_PTDEV by default if there's no such configure. Tracked-On: #3475 Signed-off-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
ff54fa2325
commit
4c8e60f1d0
@@ -88,6 +88,7 @@ struct acrn_vm_pci_dev_config {
|
||||
union pci_bdf pbdf; /* physical BDF of PCI device */
|
||||
uint64_t vbar_base[PCI_BAR_COUNT]; /* vbar base address of PCI device */
|
||||
struct pci_pdev *pdev; /* the physical PCI device if it's a PT device */
|
||||
const struct pci_vdev_ops *vdev_ops; /* operations for PCI CFG read/write */
|
||||
} __aligned(8);
|
||||
|
||||
struct acrn_vm_config {
|
||||
|
@@ -111,11 +111,10 @@ struct acrn_vpci {
|
||||
struct pci_vdev pci_vdevs[CONFIG_MAX_PCI_DEV_NUM];
|
||||
};
|
||||
|
||||
extern const struct pci_vdev_ops vhostbridge_ops;
|
||||
void vpci_init(struct acrn_vm *vm);
|
||||
void vpci_cleanup(const struct acrn_vm *vm);
|
||||
void vpci_set_ptdev_intr_info(const struct acrn_vm *target_vm, uint16_t vbdf, uint16_t pbdf);
|
||||
void vpci_reset_ptdev_intr_info(const struct acrn_vm *target_vm, uint16_t vbdf, uint16_t pbdf);
|
||||
|
||||
const struct pci_vdev_ops *get_vhostbridge_ops(void);
|
||||
|
||||
#endif /* VPCI_H_ */
|
||||
|
Reference in New Issue
Block a user