mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-04 10:25:00 +00:00
HV: remove mptable in vm_config
Define a static mptable array and each VM could index its vmptable by vm id, then mptable is not needed in vm configurations; Tracked-On: #2291 Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
26c7e372b1
commit
f2fe35472b
@@ -9,6 +9,8 @@
|
||||
#include <mptable.h>
|
||||
#include <default_acpi_info.h>
|
||||
|
||||
static struct mptable_info vm_mptables[CONFIG_MAX_VM_NUM];
|
||||
|
||||
static struct mptable_info mptable_template = {
|
||||
.mpfp = {
|
||||
.signature = MPFP_SIG,
|
||||
@@ -80,7 +82,6 @@ static uint8_t mpt_compute_checksum(void *base, size_t len)
|
||||
/**
|
||||
* @pre vm != NULL
|
||||
* @pre vm->vm_id < CONFIG_MAX_VM_NUM
|
||||
* @pre vm_configs[vm->vm_id].mptable != NULL
|
||||
*/
|
||||
int32_t mptable_build(struct acrn_vm *vm)
|
||||
{
|
||||
@@ -96,7 +97,7 @@ int32_t mptable_build(struct acrn_vm *vm)
|
||||
struct acrn_vm_config *vm_config;
|
||||
|
||||
vm_config = get_vm_config(vm->vm_id);
|
||||
mptable = vm_config->mptable;
|
||||
mptable = &vm_mptables[vm->vm_id];
|
||||
vcpu_num = vm_config->cpu_num;
|
||||
pcpu_bitmap = vm_config->pcpu_bitmap;
|
||||
(void *)memcpy_s((void *)mptable, sizeof(struct mptable_info),
|
||||
|
Reference in New Issue
Block a user