Files
acrn-hypervisor/hypervisor/arch/x86/configs/partition_config.c
Victor Sun 9e33178998 HV: add vm config files for partition mode
Add VM configure files for Intel apl-mrb and dnv-cb2 platforms.

The board specific config header is named as partition_config.h and
the PCI passthrough device list is named as pt_dev.c under
hypervisor/arch/x86/configs/$CONFIG_BOARD folder.

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-02-02 17:41:33 +08:00

45 lines
940 B
C

/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <hypervisor.h>
#include <partition_config.h>
#define INIT_VM_CONFIG(idx) \
{ \
.type = VM##idx##_CONFIG_TYPE, \
.name = VM##idx##_CONFIG_NAME, \
.pcpu_bitmap = VM##idx##_CONFIG_PCPU_BITMAP, \
.guest_flags = VM##idx##_CONFIG_FLAGS, \
.memory = { \
.start_hpa = VM##idx##_CONFIG_MEM_START_HPA, \
.size = VM##idx##_CONFIG_MEM_SIZE, \
}, \
.os_config = { \
.name = VM##idx##_CONFIG_OS_NAME, \
.bootargs = VM##idx##_CONFIG_OS_BOOTARGS, \
}, \
.vm_vuart = true, \
.vpci_vdev_array = &vpci_vdev_array##idx, \
},
struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] __aligned(PAGE_SIZE) = {
#ifdef VM0_CONFIGURED
INIT_VM_CONFIG(0)
#endif
#ifdef VM1_CONFIGURED
INIT_VM_CONFIG(1)
#endif
#ifdef VM2_CONFIGURED
INIT_VM_CONFIG(2)
#endif
#ifdef VM3_CONFIGURED
INIT_VM_CONFIG(3)
#endif
};