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:
Li, Fei1
2019-08-07 23:29:18 +08:00
committed by ACRN System Integration
parent ff54fa2325
commit 4c8e60f1d0
6 changed files with 14 additions and 14 deletions

View File

@@ -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 {