HV: add hybrid scenario
Hybrid scenario will run 3 VMs: one pre-launched VM, one pre-launched SOS VM and one post-launched Standard VM. Tracked-On: #3214 Signed-off-by: Victor Sun <victor.sun@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
parent
a2c6b11614
commit
0a748fedac
|
@ -46,6 +46,8 @@ else ifeq ($(CONFIG_LOGICAL_PARTITION),y)
|
|||
SCENARIO_NAME := logical_partition
|
||||
else ifeq ($(CONFIG_INDUSTRY),y)
|
||||
SCENARIO_NAME := industry
|
||||
else ifeq ($(CONFIG_HYBRID),y)
|
||||
SCENARIO_NAME := hybrid
|
||||
endif
|
||||
|
||||
LD_IN_TOOL = scripts/genld.sh
|
||||
|
|
|
@ -22,6 +22,13 @@ config INDUSTRY
|
|||
one pre-launched SOS VM, one post-launched Standard VM for HMI, one or two
|
||||
post-launched RT VM for real-time control.
|
||||
|
||||
config HYBRID
|
||||
bool "Hybrid VMs"
|
||||
help
|
||||
This scenario is a typical scenario for hybrid usage with 3 VMs:
|
||||
one pre-launched VM, one pre-launched SOS VM and one post-launched Standard
|
||||
VM.
|
||||
|
||||
endchoice
|
||||
|
||||
config BOARD
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <vm_config.h>
|
||||
#include <vuart.h>
|
||||
|
||||
struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
||||
{ /* VM0 */
|
||||
.load_order = PRE_LAUNCHED_VM,
|
||||
.name = "ACRN PRE-LAUNCHED VM0",
|
||||
.uuid = {0xfcU, 0x83U, 0x69U, 0x01U, 0x86U, 0x85U, 0x4bU, 0xc0U, \
|
||||
0x8bU, 0x71U, 0x6eU, 0x31U, 0xdcU, 0x36U, 0xfaU, 0x47U},
|
||||
/* fc836901-8685-4bc0-8b71-6e31dc36fa47 */
|
||||
.guest_flags = GUEST_FLAG_HIGHEST_SEVERITY,
|
||||
.pcpu_bitmap = VM0_CONFIG_PCPU_BITMAP,
|
||||
.clos = 0U,
|
||||
.memory = {
|
||||
.start_hpa = VM0_CONFIG_MEM_START_HPA,
|
||||
.size = VM0_CONFIG_MEM_SIZE,
|
||||
},
|
||||
.os_config = {
|
||||
.name = "Zephyr",
|
||||
.kernel_type = KERNEL_ZEPHYR,
|
||||
.kernel_mod_tag = "Zephyr_RawImage",
|
||||
.bootargs = "",
|
||||
.kernel_load_addr = 0x100000,
|
||||
.kernel_entry_addr = 0x100000,
|
||||
},
|
||||
.vuart[0] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
.addr.port_base = COM1_BASE,
|
||||
.irq = COM1_IRQ,
|
||||
},
|
||||
.vuart[1] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
.addr.port_base = COM2_BASE,
|
||||
.irq = COM2_IRQ,
|
||||
.t_vuart.vm_id = 1U,
|
||||
.t_vuart.vuart_id = 1U,
|
||||
},
|
||||
},
|
||||
{ /* VM1 */
|
||||
.load_order = SOS_VM,
|
||||
.name = "ACRN SOS VM",
|
||||
.uuid = {0xdbU, 0xbbU, 0xd4U, 0x34U, 0x7aU, 0x57U, 0x42U, 0x16U, \
|
||||
0xa1U, 0x2cU, 0x22U, 0x01U, 0xf1U, 0xabU, 0x02U, 0x40U},
|
||||
/* dbbbd434-7a57-4216-a12c-2201f1ab0240 */
|
||||
|
||||
/* Allow SOS to reboot the host since there is supposed to be the highest severity guest */
|
||||
.guest_flags = GUEST_FLAG_HIGHEST_SEVERITY,
|
||||
.clos = 0U,
|
||||
.memory = {
|
||||
.start_hpa = 0UL,
|
||||
.size = CONFIG_SOS_RAM_SIZE,
|
||||
},
|
||||
.os_config = {
|
||||
.name = "ACRN Service OS",
|
||||
.kernel_type = KERNEL_BZIMAGE,
|
||||
.kernel_mod_tag = "Linux_bzImage",
|
||||
.bootargs = SOS_VM_BOOTARGS,
|
||||
},
|
||||
.vuart[0] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
.addr.port_base = CONFIG_COM_BASE,
|
||||
.irq = CONFIG_COM_IRQ,
|
||||
},
|
||||
.vuart[1] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
.addr.port_base = INVALID_COM_BASE,
|
||||
}
|
||||
},
|
||||
{ /* VM2 */
|
||||
.load_order = POST_LAUNCHED_VM,
|
||||
.uuid = {0xd2U, 0x79U, 0x54U, 0x38U, 0x25U, 0xd6U, 0x11U, 0xe8U, \
|
||||
0x86U, 0x4eU, 0xcbU, 0x7aU, 0x18U, 0xb3U, 0x46U, 0x43U},
|
||||
/* d2795438-25d6-11e8-864e-cb7a18b34643 */
|
||||
.vuart[0] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
.addr.port_base = INVALID_COM_BASE,
|
||||
},
|
||||
.vuart[1] = {
|
||||
.type = VUART_LEGACY_PIO,
|
||||
.addr.port_base = INVALID_COM_BASE,
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef VM_CONFIGURATIONS_H
|
||||
#define VM_CONFIGURATIONS_H
|
||||
|
||||
#include <misc_cfg.h>
|
||||
|
||||
/* Bits mask of guest flags that can be programmed by device model. Other bits are set by hypervisor only */
|
||||
#define DM_OWNED_GUEST_FLAG_MASK (GUEST_FLAG_SECURE_WORLD_ENABLED | GUEST_FLAG_LAPIC_PASSTHROUGH | \
|
||||
GUEST_FLAG_RT | GUEST_FLAG_IO_COMPLETION_POLLING)
|
||||
|
||||
#define CONFIG_MAX_VM_NUM 3U
|
||||
|
||||
#define VM0_CONFIG_PCPU_BITMAP (PLUG_CPU(3))
|
||||
#define VM0_CONFIG_MEM_START_HPA 0x100000000UL
|
||||
#define VM0_CONFIG_MEM_SIZE 0x20000000UL
|
||||
|
||||
#define SOS_VM_BOOTARGS SOS_ROOTFS \
|
||||
"rw rootwait " \
|
||||
"console=tty0 " \
|
||||
SOS_CONSOLE \
|
||||
"consoleblank=0 " \
|
||||
"no_timer_check " \
|
||||
"quiet loglevel=3 " \
|
||||
"i915.nuclear_pageflip=1 " \
|
||||
"i915.avail_planes_per_pipe=0x01010F " \
|
||||
"i915.domain_plane_owners=0x011111110000 " \
|
||||
"i915.enable_gvt=1 " \
|
||||
SOS_BOOTARGS_DIFF
|
||||
|
||||
#endif /* VM_CONFIGURATIONS_H */
|
Loading…
Reference in New Issue