HV: repace vpci_vdev_array with pci_ptdev config

Use acrn_vm_pci_ptdev_config struct for PCI PT devices configuration
in acrn_vm_config, the only needed configure item is PT devices's
vBDF and pBDF info. When init PT devices, the BDF info will be stored
in pci_vdevs[] of acrn_vm.

With this patch, the previous vpci_vdev_array struct is not needed.

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun
2019-02-02 16:52:05 +08:00
committed by Eddie Dong
parent af1e5d5742
commit 827d24ccb9
7 changed files with 77 additions and 98 deletions

View File

@@ -154,6 +154,8 @@ struct acrn_vm {
struct acrn_vpci vpci;
#ifdef CONFIG_PARTITION_MODE
struct mptable_info mptable;
struct pci_vdev pci_vdevs[CONFIG_MAX_PCI_DEV_NUM];
/* the valid number of pci_vdevs[] is vm_config->pci_ptdev_num */
uint8_t vrtc_offset;
#endif
@@ -163,13 +165,6 @@ struct acrn_vm {
bool snoopy_mem;
} __aligned(PAGE_SIZE);
#ifdef CONFIG_PARTITION_MODE
struct vpci_vdev_array {
int32_t num_pci_vdev;
struct pci_vdev vpci_vdev_list[];
};
#endif
#define MAX_BOOTARGS_SIZE 1024U
#define MAX_CONFIG_NAME_SIZE 32U