Skip to content

Commit a90a6a1

Browse files
fuzhonglacrnsi
authored andcommitted
HV: add SDC2 config in hypervisor/arch/x86/Kconfig
Per community requirement;up to three post-launched VM might be needed for some automotive SDC system, so add SDC2 scenario to satisfy this requirement. Tracked-On: #3429 Signed-off-by: fuzhongl <fuzhong.liu@intel.com> Reviewed-by: Victor Sun <victor.sun@intel.com>
1 parent 796ac55 commit a90a6a1

File tree

4 files changed

+125
-0
lines changed

4 files changed

+125
-0
lines changed

hypervisor/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ include scripts/kconfig/kconfig.mk
5252
#initialize scenarios name
5353
ifeq ($(CONFIG_SDC),y)
5454
SCENARIO_NAME := sdc
55+
else ifeq ($(CONFIG_SDC2),y)
56+
SCENARIO_NAME := sdc2
5557
else ifeq ($(CONFIG_LOGICAL_PARTITION),y)
5658
SCENARIO_NAME := logical_partition
5759
else ifeq ($(CONFIG_INDUSTRY),y)

hypervisor/arch/x86/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ config SDC
1010
SDC (Software Defined Cockpit) is a typical scenario that ACRN supported.
1111
SDC will have one pre-launched SOS VM and one post-launched VM.
1212

13+
config SDC2
14+
bool "Software Defined Cockpit 2"
15+
help
16+
SDC2 (Software Defined Cockpit 2) is an extended scenario for automotive SDC system.
17+
SDC2 will have one pre-launched SOS VM and up to three post-launched VM.
18+
1319
config LOGICAL_PARTITION
1420
bool "Logical Partition VMs"
1521
help
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/*
2+
* Copyright (C) 2018 Intel Corporation. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
7+
#include <vm_config.h>
8+
#include <vuart.h>
9+
10+
struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
11+
{
12+
.load_order = SOS_VM,
13+
.name = "ACRN SOS VM",
14+
.uuid = {0xdbU, 0xbbU, 0xd4U, 0x34U, 0x7aU, 0x57U, 0x42U, 0x16U, \
15+
0xa1U, 0x2cU, 0x22U, 0x01U, 0xf1U, 0xabU, 0x02U, 0x40U},
16+
/* dbbbd434-7a57-4216-a12c-2201f1ab0240 */
17+
18+
/* Allow SOS to reboot the host since there is supposed to be the highest severity guest */
19+
.guest_flags = GUEST_FLAG_HIGHEST_SEVERITY,
20+
.clos = 0U,
21+
.memory = {
22+
.start_hpa = 0UL,
23+
.size = CONFIG_SOS_RAM_SIZE,
24+
},
25+
.os_config = {
26+
.name = "ACRN Service OS",
27+
.kernel_type = KERNEL_BZIMAGE,
28+
.kernel_mod_tag = "Linux_bzImage",
29+
.bootargs = SOS_VM_BOOTARGS,
30+
},
31+
.vuart[0] = {
32+
.type = VUART_LEGACY_PIO,
33+
.addr.port_base = CONFIG_COM_BASE,
34+
.irq = CONFIG_COM_IRQ,
35+
},
36+
.vuart[1] = {
37+
.type = VUART_LEGACY_PIO,
38+
.addr.port_base = INVALID_COM_BASE,
39+
}
40+
},
41+
{
42+
.load_order = POST_LAUNCHED_VM,
43+
.uuid = {0xd2U, 0x79U, 0x54U, 0x38U, 0x25U, 0xd6U, 0x11U, 0xe8U, \
44+
0x86U, 0x4eU, 0xcbU, 0x7aU, 0x18U, 0xb3U, 0x46U, 0x43U},
45+
/* d2795438-25d6-11e8-864e-cb7a18b34643 */
46+
.vuart[0] = {
47+
.type = VUART_LEGACY_PIO,
48+
.addr.port_base = INVALID_COM_BASE,
49+
},
50+
.vuart[1] = {
51+
.type = VUART_LEGACY_PIO,
52+
.addr.port_base = INVALID_COM_BASE,
53+
}
54+
55+
},
56+
{
57+
.load_order = POST_LAUNCHED_VM,
58+
.uuid = {0x49U, 0x5aU, 0xe2U, 0xe5U, 0x26U, 0x03U, 0x4dU, 0x64U, \
59+
0xafU, 0x76U, 0xd4U, 0xbcU, 0x5aU, 0x8eU, 0xc0U, 0xe5U},
60+
/* 495ae2e5-2603-4d64-af76-d4bc5a8ec0e5 */
61+
.vuart[0] = {
62+
.type = VUART_LEGACY_PIO,
63+
.addr.port_base = INVALID_COM_BASE,
64+
},
65+
.vuart[1] = {
66+
.type = VUART_LEGACY_PIO,
67+
.addr.port_base = INVALID_COM_BASE,
68+
}
69+
70+
},
71+
{
72+
.load_order = POST_LAUNCHED_VM,
73+
.uuid = {0x38U, 0x15U, 0x88U, 0x21U, 0x52U, 0x08U, 0x40U, 0x05U, \
74+
0xb7U, 0x2aU, 0x8aU, 0x60U, 0x9eU, 0x41U, 0x90U, 0xd0U},
75+
/* 38158821-5208-4005-b72a-8a609e4190d0 */
76+
.vuart[0] = {
77+
.type = VUART_LEGACY_PIO,
78+
.addr.port_base = INVALID_COM_BASE,
79+
},
80+
.vuart[1] = {
81+
.type = VUART_LEGACY_PIO,
82+
.addr.port_base = INVALID_COM_BASE,
83+
}
84+
85+
}
86+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (C) 2018 Intel Corporation. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
7+
#ifndef VM_CONFIGURATIONS_H
8+
#define VM_CONFIGURATIONS_H
9+
10+
#include <misc_cfg.h>
11+
12+
#define CONFIG_MAX_VM_NUM (4U + CONFIG_MAX_KATA_VM_NUM)
13+
14+
/* Bits mask of guest flags that can be programmed by device model. Other bits are set by hypervisor only */
15+
#define DM_OWNED_GUEST_FLAG_MASK (GUEST_FLAG_SECURE_WORLD_ENABLED | GUEST_FLAG_LAPIC_PASSTHROUGH | \
16+
GUEST_FLAG_RT | GUEST_FLAG_IO_COMPLETION_POLLING)
17+
18+
#define SOS_VM_BOOTARGS SOS_ROOTFS \
19+
"rw rootwait " \
20+
"console=tty0 " \
21+
SOS_CONSOLE \
22+
"consoleblank=0 " \
23+
"no_timer_check " \
24+
"quiet loglevel=3 " \
25+
"i915.nuclear_pageflip=1 " \
26+
"i915.avail_planes_per_pipe=0x01010F " \
27+
"i915.domain_plane_owners=0x011111110000 " \
28+
"i915.enable_gvt=1 " \
29+
SOS_BOOTARGS_DIFF
30+
31+
#endif /* VM_CONFIGURATIONS_H */

0 commit comments

Comments
 (0)