acrn-hypervisor/hypervisor/scenarios/logical_partition/vm_configurations.c
Sainath Grandhi 16a2af5715 hv: Build mptable for guest if VM type is Pre-Launched
ACRN builds mptable for pre-launched VMs. It uses CONFIG_PARTITION_MODE
to compile mptable source code and related support. This patch removes
the macro and checks if the type of VM is pre-launched to build mptable.

Tracked-On: #2941
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-04-15 15:51:02 +08:00

74 lines
2.3 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];
static struct mptable_info vm_mptables[CONFIG_MAX_VM_NUM];
struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
{ /* VM0 */
.type = PRE_LAUNCHED_VM,
.name = "ACRN PRE-LAUNCHED VM0",
.uuid = {0x26U, 0xc5U, 0xe0U, 0xd8U, 0x8fU, 0x8aU, 0x47U, 0xd8U, \
0x81U, 0x09U, 0xf2U, 0x01U, 0xebU, 0xd6U, 0x1aU, 0x5eU},
/* 26c5e0d8-8f8a-47d8-8109-f201ebd61a5e */
.pcpu_bitmap = VM0_CONFIG_PCPU_BITMAP,
.cpu_num = VM0_CONFIG_NUM_CPUS,
.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,
.mptable = &vm_mptables[0],
},
{ /* VM1 */
.type = PRE_LAUNCHED_VM,
.name = "ACRN PRE-LAUNCHED VM1",
.uuid = {0xddU, 0x87U, 0xceU, 0x08U, 0x66U, 0xf9U, 0x47U, 0x3dU, \
0xbcU, 0x58U, 0x76U, 0x05U, 0x83U, 0x7fU, 0x93U, 0x5eU},
/* dd87ce08-66f9-473d-bc58-7605837f935e */
.pcpu_bitmap = VM1_CONFIG_PCPU_BITMAP,
.cpu_num = VM1_CONFIG_NUM_CPUS,
.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,
.mptable = &vm_mptables[1],
},
};