mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
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>
This commit is contained in:
committed by
Eddie Dong
parent
869de39757
commit
16a2af5715
@@ -29,10 +29,6 @@
|
||||
#include <e820.h>
|
||||
#include <vm_config.h>
|
||||
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
#include <mptable.h>
|
||||
#endif
|
||||
|
||||
#define INVALID_VM_ID 0xffffU
|
||||
|
||||
struct vm_hw_info {
|
||||
@@ -151,9 +147,6 @@ struct acrn_vm {
|
||||
struct vcpuid_entry vcpuid_entries[MAX_VM_VCPUID_ENTRIES];
|
||||
struct acrn_vpci vpci;
|
||||
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
struct mptable_info mptable;
|
||||
#endif
|
||||
uint8_t vrtc_offset;
|
||||
|
||||
spinlock_t softirq_dev_lock;
|
||||
@@ -222,9 +215,6 @@ int32_t general_sw_loader(struct acrn_vm *vm);
|
||||
typedef int32_t (*vm_sw_loader_t)(struct acrn_vm *vm);
|
||||
extern vm_sw_loader_t vm_sw_loader;
|
||||
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
uint16_t get_vm_pcpu_nums(const struct acrn_vm_config *vm_config);
|
||||
#endif
|
||||
void vrtc_init(struct acrn_vm *vm);
|
||||
|
||||
bool is_lapic_pt(const struct acrn_vm *vm);
|
||||
|
@@ -11,6 +11,7 @@
|
||||
#include <pci.h>
|
||||
#include <multiboot.h>
|
||||
#include <acrn_common.h>
|
||||
#include <mptable.h>
|
||||
#include <vm_configurations.h>
|
||||
|
||||
#define PLUG_CPU(n) (1U << (n))
|
||||
@@ -47,6 +48,7 @@ struct acrn_vm_config {
|
||||
char name[MAX_VM_OS_NAME_LEN]; /* VM name identifier, useful for debug. */
|
||||
const uint8_t uuid[16]; /* UUID of the VM */
|
||||
uint64_t pcpu_bitmap; /* from pcpu bitmap, we could know VM core number */
|
||||
uint16_t cpu_num; /* Number of vCPUs for the VM */
|
||||
uint64_t guest_flags; /* VM flags that we want to configure for guest
|
||||
* Now we have two flags:
|
||||
* GUEST_FLAG_SECURE_WORLD_ENABLED
|
||||
@@ -60,6 +62,7 @@ struct acrn_vm_config {
|
||||
uint16_t clos; /* if guest_flags has GUEST_FLAG_CLOS_REQUIRED, then VM use this CLOS */
|
||||
|
||||
bool vm_vuart;
|
||||
struct mptable_info *mptable; /* Pointer to mptable struct if VM type is pre-launched */
|
||||
} __aligned(8);
|
||||
|
||||
struct acrn_vm_config *get_vm_config(uint16_t vm_id);
|
||||
|
@@ -33,7 +33,7 @@
|
||||
*/
|
||||
#define MPTABLE_MAX_LENGTH 65536U
|
||||
|
||||
#define LAPIC_VERSION 16U
|
||||
#define LAPIC_VERSION_NUM 16U
|
||||
|
||||
#define MP_SPECREV 4U
|
||||
#define MPFP_SIG "_MP_"
|
||||
|
Reference in New Issue
Block a user