acrn-config: add sos pci_dev_num and pci_devs to vm_configurations.c

Add following to default output scenarios vm_configurations.c:
 - pci_dev_num
 - pci_devs = sos_pci_devs

Both was defineded in CONFIG_SOS_VM.

Tracked-On: #5426
Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
This commit is contained in:
Yang, Yu-chu 2020-10-22 15:05:33 -07:00 committed by wenlingz
parent 57ed333027
commit 0f16746c1e
4 changed files with 12 additions and 12 deletions

View File

@ -396,18 +396,7 @@ def generate_file(scenario_items, config):
vm_info = scenario_items['vm']
gen_source_header(config)
pci_dev_config_flag = False
for vm_i,pci_dev_num in vm_info.cfg_pci.pci_dev_num.items():
if pci_dev_num >= 2:
pci_dev_config_flag = True
break
if vm_info.shmem.shmem_enabled == 'y':
for vm_id, shm_num in vm_info.shmem.shmem_num.items():
if shm_num > 0:
pci_dev_config_flag = True
break
if pci_dev_config_flag:
declare_pci_devs(vm_info, config)
declare_pci_devs(vm_info, config)
if (board_cfg_lib.is_matched_board(("ehl-crb-b"))
and vm_info.pt_intx_info.phys_gsi.get(0) is not None

View File

@ -7,6 +7,8 @@
#include <vuart.h>
#include <pci_dev.h>
extern struct acrn_vm_pci_dev_config sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM];
extern struct pt_intx_config vm0_pt_intx[1U];
struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
@ -97,6 +99,8 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
.t_vuart.vm_id = 0U,
.t_vuart.vuart_id = 1U,
},
.pci_dev_num = 0U,
.pci_devs = sos_pci_devs,
},
{ /* VM2 */
CONFIG_POST_STD_VM(1),

View File

@ -8,6 +8,7 @@
#include <pci_dev.h>
extern struct acrn_vm_pci_dev_config vm0_pci_devs[VM0_CONFIG_PCI_DEV_NUM];
extern struct acrn_vm_pci_dev_config sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM];
extern struct acrn_vm_pci_dev_config vm2_pci_devs[VM2_CONFIG_PCI_DEV_NUM];
extern struct pt_intx_config vm0_pt_intx[1U];
@ -101,6 +102,8 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
.t_vuart.vm_id = 0U,
.t_vuart.vuart_id = 1U,
},
.pci_dev_num = 0U,
.pci_devs = sos_pci_devs,
},
{ /* VM2 */
CONFIG_POST_STD_VM(1),

View File

@ -7,6 +7,8 @@
#include <vuart.h>
#include <pci_dev.h>
extern struct acrn_vm_pci_dev_config sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM];
extern struct pt_intx_config vm0_pt_intx[1U];
struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
@ -42,6 +44,8 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
.t_vuart.vm_id = 2U,
.t_vuart.vuart_id = 1U,
},
.pci_dev_num = 0U,
.pci_devs = sos_pci_devs,
},
{ /* VM1 */
CONFIG_POST_STD_VM(1),