mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +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
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <vm_config.h>
|
||||
#include <pci_devices.h>
|
||||
#include <vpci.h>
|
||||
|
||||
/* The vbar_base info of pt devices is included in device MACROs which defined in
|
||||
* arch/x86/configs/$(CONFIG_BOARD)/pci_devices.h.
|
||||
@@ -16,6 +17,7 @@ struct acrn_vm_pci_dev_config vm0_pci_devs[VM0_CONFIG_PCI_DEV_NUM] = {
|
||||
{
|
||||
.emu_type = PCI_DEV_TYPE_HVEMUL,
|
||||
.vbdf.bits = {.b = 0x00U, .d = 0x00U, .f = 0x00U},
|
||||
.vdev_ops = &vhostbridge_ops,
|
||||
},
|
||||
{
|
||||
.emu_type = PCI_DEV_TYPE_PTDEV,
|
||||
@@ -33,6 +35,7 @@ struct acrn_vm_pci_dev_config vm1_pci_devs[VM1_CONFIG_PCI_DEV_NUM] = {
|
||||
{
|
||||
.emu_type = PCI_DEV_TYPE_HVEMUL,
|
||||
.vbdf.bits = {.b = 0x00U, .d = 0x00U, .f = 0x00U},
|
||||
.vdev_ops = &vhostbridge_ops,
|
||||
},
|
||||
{
|
||||
.emu_type = PCI_DEV_TYPE_PTDEV,
|
||||
|
||||
Reference in New Issue
Block a user