mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: vm_config: add epc info in vm config
Add EPC information in vm configuration structure. EPC information contains the EPC base and size allocated to a VM. Tracked-On: #3179 Signed-off-by: Binbin Wu <binbin.wu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
245a732055
commit
c078f90d77
@@ -7,6 +7,7 @@
|
||||
#include <vm_config.h>
|
||||
#include <logmsg.h>
|
||||
#include <cat.h>
|
||||
#include <pgtable.h>
|
||||
|
||||
/*
|
||||
* @pre vm_id < CONFIG_MAX_VM_NUM
|
||||
@@ -89,6 +90,8 @@ bool sanitize_vm_config(void)
|
||||
} else if (((vm_config->guest_flags & GUEST_FLAG_LAPIC_PASSTHROUGH) != 0U)
|
||||
&& ((vm_config->guest_flags & GUEST_FLAG_RT) == 0U)) {
|
||||
ret = false;
|
||||
}else if (vm_config->epc.size != 0UL) {
|
||||
ret = false;
|
||||
} else {
|
||||
pre_launch_pcpu_bitmap |= vm_config->pcpu_bitmap;
|
||||
}
|
||||
@@ -119,6 +122,10 @@ bool sanitize_vm_config(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (((vm_config->epc.size | vm_config->epc.base) & ~PAGE_MASK) != 0UL) {
|
||||
ret = false;
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
/* make sure no identical UUID in following VM configurations */
|
||||
ret = check_vm_uuid_collision(vm_id);
|
||||
|
Reference in New Issue
Block a user