HV: Adding mptable support for partition mode ACRN

Partitioning mode of ACRN needs to build mptable for UOS.
UOS uses mptable instead of ACPI tables.

Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
This commit is contained in:
Sainath Grandhi
2018-08-02 14:53:28 -07:00
committed by lijinxia
parent fd0c9187ef
commit 6643adff8b
4 changed files with 355 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
/*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/************************************************************************
*
* FILE NAME
*
* mptable.h
*
* DESCRIPTION
*
* This file defines API and extern variable for VM mptable info
*
************************************************************************/
/**********************************/
/* EXTERNAL VARIABLES */
/**********************************/
#ifndef MPTABLE_H
#define MPTABLE_H
struct mptable_info;
extern struct mptable_info mptable_vm1;
extern struct mptable_info mptable_vm2;
int mptable_build(struct vm *vm);
#endif /* MPTABLE_H */

View File

@@ -8,6 +8,9 @@
#define VM_H_
#include <bsp_extern.h>
#ifdef CONFIG_PARTITION_MODE
#include <mptable.h>
#endif
enum vm_privilege_level {
VM_PRIVILEGE_LEVEL_HIGH = 0,
VM_PRIVILEGE_LEVEL_MEDIUM,
@@ -155,6 +158,9 @@ struct vm {
uint32_t vcpuid_entry_nr, vcpuid_level, vcpuid_xlevel;
struct vcpuid_entry vcpuid_entries[MAX_VM_VCPUID_ENTRIES];
#ifdef CONFIG_PARTITION_MODE
struct vm_description *vm_desc;
#endif
};
struct vm_description {
@@ -166,6 +172,9 @@ struct vm_description {
uint16_t vm_hw_num_cores; /* Number of virtual cores */
/* Whether secure world is enabled for current VM. */
bool sworld_enabled;
#ifdef CONFIG_PARTITION_MODE
struct mptable_info *mptable;
#endif
};
int shutdown_vm(struct vm *vm);