hv: Inter-VM communication config for hybrid_rt on whl-ipc-i5

add an IVSHMEM regoin and the related configuration parameters in
hybrid_rt scenario on whl-ipc-i5. The size of the shared memory is
2M, and it is used for the communication between VM0 and VM2.

v6: rename shm name; remove unnecessary MACROs.

v7: rename MACRO for shm name; add unassigned vbdf for post-launched
    VMs.

Tracked-On: #4853

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Shuang Zheng
2020-08-18 14:57:30 +08:00
committed by wenlingz
parent 92f9f5a4f3
commit c26ae8c420
9 changed files with 72 additions and 1 deletions

View File

@@ -140,10 +140,14 @@ struct acrn_vm_os_config {
uint64_t kernel_ramdisk_addr;
} __aligned(8);
/* the vbdf is assgined by device model */
#define UNASSIGNED_VBDF 0xFFFFU
struct acrn_vm_pci_dev_config {
uint32_t emu_type; /* the type how the device is emulated. */
union pci_bdf vbdf; /* virtual BDF of PCI device */
union pci_bdf pbdf; /* physical BDF of PCI device */
char shm_region_name[32]; /* TODO: combine pbdf and shm_region_name into a union member */
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 */