mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-05 23:16:59 +00:00
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>
62 lines
1.7 KiB
C
62 lines
1.7 KiB
C
/*
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <vm_config.h>
|
|
#include <vm_configurations.h>
|
|
#include <acrn_common.h>
|
|
|
|
extern struct acrn_vm_pci_ptdev_config vm0_pci_ptdevs[VM0_CONFIG_PCI_PTDEV_NUM];
|
|
extern struct acrn_vm_pci_ptdev_config vm1_pci_ptdevs[VM1_CONFIG_PCI_PTDEV_NUM];
|
|
|
|
struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
|
{ /* VM0 */
|
|
.type = PRE_LAUNCHED_VM,
|
|
.name = "ACRN PRE-LAUNCHED VM0",
|
|
.pcpu_bitmap = VM0_CONFIG_PCPU_BITMAP,
|
|
.guest_flags = GUEST_FLAG_IO_COMPLETION_POLLING,
|
|
.clos = 0U,
|
|
.memory = {
|
|
.start_hpa = VM0_CONFIG_MEM_START_HPA,
|
|
.size = VM0_CONFIG_MEM_SIZE,
|
|
},
|
|
.os_config = {
|
|
.name = "ClearLinux",
|
|
.bootargs = VM0_CONFIG_OS_BOOTARG_CONSOLE \
|
|
VM0_CONFIG_OS_BOOTARG_MAXCPUS \
|
|
VM0_CONFIG_OS_BOOTARG_ROOT \
|
|
"rw rootwait noxsave nohpet console=hvc0 \
|
|
no_timer_check ignore_loglevel log_buf_len=16M \
|
|
consoleblank=0 tsc=reliable xapic_phys"
|
|
},
|
|
.vm_vuart = true,
|
|
.pci_ptdev_num = VM0_CONFIG_PCI_PTDEV_NUM,
|
|
.pci_ptdevs = vm0_pci_ptdevs,
|
|
},
|
|
{ /* VM1 */
|
|
.type = PRE_LAUNCHED_VM,
|
|
.name = "ACRN PRE-LAUNCHED VM1",
|
|
.pcpu_bitmap = VM1_CONFIG_PCPU_BITMAP,
|
|
.guest_flags = GUEST_FLAG_IO_COMPLETION_POLLING,
|
|
.clos = 0U,
|
|
.memory = {
|
|
.start_hpa = VM1_CONFIG_MEM_START_HPA,
|
|
.size = VM1_CONFIG_MEM_SIZE,
|
|
},
|
|
.os_config = {
|
|
.name = "ClearLinux",
|
|
.bootargs = VM1_CONFIG_OS_BOOTARG_CONSOLE \
|
|
VM1_CONFIG_OS_BOOTARG_MAXCPUS \
|
|
VM1_CONFIG_OS_BOOTARG_ROOT \
|
|
"rw rootwait noxsave nohpet console=hvc0 \
|
|
no_timer_check ignore_loglevel log_buf_len=16M \
|
|
consoleblank=0 tsc=reliable xapic_phys"
|
|
},
|
|
.vm_vuart = true,
|
|
.pci_ptdev_num = VM1_CONFIG_PCI_PTDEV_NUM,
|
|
.pci_ptdevs = vm1_pci_ptdevs,
|
|
},
|
|
};
|