diff --git a/hypervisor/dm/vpci/ivshmem.c b/hypervisor/dm/vpci/ivshmem.c index d12ad5c78..164ce16d5 100644 --- a/hypervisor/dm/vpci/ivshmem.c +++ b/hypervisor/dm/vpci/ivshmem.c @@ -329,6 +329,9 @@ static void init_ivshmem_bar(struct pci_vdev *vdev, uint32_t bar_idx) static void init_ivshmem_vdev(struct pci_vdev *vdev) { + struct acrn_vm_pci_dev_config *dev_config = vdev->pci_dev_config; + struct ivshmem_shm_region *region = find_shm_region(dev_config->shm_region_name); + create_ivshmem_device(vdev); /* initialize ivshmem config */ @@ -338,6 +341,9 @@ static void init_ivshmem_vdev(struct pci_vdev *vdev) pci_vdev_write_vcfg(vdev, PCIR_CLASS, 1U, IVSHMEM_CLASS); pci_vdev_write_vcfg(vdev, PCIR_HDRTYPE, 1U, PCIM_HDRTYPE_NORMAL | ((vdev->bdf.bits.f == 0U) ? PCIM_MFDEV : 0U)); + + pci_vdev_write_vcfg(vdev, PCIV_SUB_VENDOR_ID, 2U, IVSHMEM_INTEL_SUBVENDOR_ID); + pci_vdev_write_vcfg(vdev, PCIV_SUB_SYSTEM_ID, 2U, region->region_id); add_vmsix_capability(vdev, MAX_IVSHMEM_MSIX_TBL_ENTRY_NUM, IVSHMEM_MSIX_BAR); /* initialize ivshmem bars */ diff --git a/hypervisor/include/dm/ivshmem.h b/hypervisor/include/dm/ivshmem.h index 776f2400e..83cf209a4 100644 --- a/hypervisor/include/dm/ivshmem.h +++ b/hypervisor/include/dm/ivshmem.h @@ -9,6 +9,7 @@ #define IVSHMEM_VENDOR_ID 0x1af4U #define IVSHMEM_DEVICE_ID 0x1110U +#define IVSHMEM_INTEL_SUBVENDOR_ID 0x8086U #ifdef CONFIG_IVSHMEM_ENABLED /*