mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 01:37:44 +00:00
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:
committed by
lijinxia
parent
fd0c9187ef
commit
6643adff8b
31
hypervisor/include/arch/x86/guest/mptable.h
Normal file
31
hypervisor/include/arch/x86/guest/mptable.h
Normal 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 */
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user