HV: use separated vm_config.c for each scenario

Previously we use unified vm_config.c for all scenarios and use MACROs
for each configuration items, then the initialization of vm_configs[]
becomes more complicated when definition of MACROs increase, so change
the coding style that all configurable items could be explicitly shown in
vm_configuration.c to make code more readable.

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-04-04 13:02:45 +08:00
committed by Eddie Dong
parent d8cec9f9c4
commit d3e4f69595
8 changed files with 96 additions and 107 deletions

View File

@@ -4,26 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* This is a template of vm_configurations.h for sharing mode;
*/
#ifndef VM_CONFIGURATIONS_H
#define VM_CONFIGURATIONS_H
#define VM0_CONFIGURED
#define VM0_CONFIG_NAME "ACRN SOS VM"
#define VM0_CONFIG_TYPE SOS_VM
#define VM0_CONFIG_PCPU_BITMAP 0UL /* PCPU Bitmap is reserved in SOS_VM */
#define VM0_CONFIG_FLAGS GUEST_FLAG_IO_COMPLETION_POLLING
#define VM0_CONFIG_CLOS 0U
#define VM0_CONFIG_MEM_START_HPA 0UL
#define VM0_CONFIG_MEM_SIZE CONFIG_SOS_RAM_SIZE
#define VM0_CONFIG_OS_NAME "ACRN Service OS"
#define VM0_CONFIG_OS_BOOTARGS "configured in devicemodel/samples/apl-mrb/sos_bootargs_xxxx.txt"
#define VM0_CONFIG_PCI_PTDEV_NUM 0U /* PTDEV is reserved in SOS_VM */
extern struct acrn_vm_pci_ptdev_config vm0_pci_ptdevs[VM0_CONFIG_PCI_PTDEV_NUM];
#endif /* VM_CONFIGURATIONS_H */