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

@@ -1,3 +1,17 @@
choice
prompt "ACRN Scenario"
default SDC
help
Select the scenario name to load corresponding VM configuration.
config SDC
bool "Software Defined Cockpit"
help
SDC (Software Defined Cockpit) is a typical scenario that ACRN supported.
SDC will have one pre-launched SOS VM and one post-launched NORMAL VM.
endchoice
choice
prompt "Hypervisor mode"
default SHARING_MODE

View File

@@ -1 +0,0 @@
../sos_vm.h

View File

@@ -1 +0,0 @@
../sos_vm.h

View File

@@ -1 +0,0 @@
../sos_vm.h

View File

@@ -1 +0,0 @@
../sos_vm.h

View File

@@ -1 +0,0 @@
../sos_vm.h

View File

@@ -1,21 +0,0 @@
/*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* This is a template of sos_vm.h and is linked to ./$(CONFIG_BOARD)/sos_vm.h,
* If you need a board specific sos_vm.h, make a copy in ./$(CONFIG_BOARD)/
* and replace the original symbol link.
*/
#ifndef SOS_VM_CONFIG_H
#define SOS_VM_CONFIG_H
#define SOS_VM_CONFIG_NAME "ACRN SOS VM"
#define SOS_VM_CONFIG_GUEST_FLAGS GUEST_FLAG_IO_COMPLETION_POLLING
#define SOS_VM_CONFIG_OS_NAME "ACRN Service OS"
#endif /* SOS_VM_CONFIG_H */

View File

@@ -12,24 +12,10 @@
#include <logmsg.h>
#include <cat.h>
#ifndef CONFIG_PARTITION_MODE
#include <sos_vm.h>
static struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] __aligned(PAGE_SIZE) = {
{
.type = SOS_VM,
.name = SOS_VM_CONFIG_NAME,
.guest_flags = SOS_VM_CONFIG_GUEST_FLAGS,
.memory = {
.start_hpa = 0x0UL,
.size = CONFIG_SOS_RAM_SIZE,
},
.os_config = {
.name = SOS_VM_CONFIG_OS_NAME,
},
},
};
#include <vm_configurations.h>
#else
#include <partition_config.h>
#endif
#define INIT_VM_CONFIG(idx) \
{ \
@@ -67,7 +53,6 @@ static struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] __aligned(PAGE_SIZE)
INIT_VM_CONFIG(3),
#endif
};
#endif
/*
* @pre vm_id < CONFIG_MAX_VM_NUM