HV: introduce scenario Kconfig for sharing mode

Previously the vm_configs[] is defined separately for sharing mode and
partition mode, but the concept of hypervisor mode will be removed. Instead
we will introduce scenario Kconfig for hypervisor to load different vm
configurations.

SDC(Software Defined Cockpit) is a typical scenario that ACRN supported
so we introduce this scenario for previously sharing mode and move its
configurations to scenarios/sdc folder. The configuration could be used
for all boards reference.

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-02 11:04:36 +08:00
committed by wenlingz
parent 564c9dcb79
commit 56c193851a
12 changed files with 62 additions and 45 deletions

View File

@@ -0,0 +1,10 @@
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <vm_config.h>
#include <vm_configurations.h>
__unused struct acrn_vm_pci_ptdev_config vm0_pci_ptdevs[VM0_CONFIG_PCI_PTDEV_NUM];

View File

@@ -0,0 +1,28 @@
/*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* 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_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 */