mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-03 18:04:25 +00:00
HV: Remove unnecessary vm0 check in vm0 specific func
Function prepare_vm0_memmap_and_e820 and init_vm0_boot_info are specific for vm0. There is no need to check is_vm0 again in those functions. This patch remove the unnecssary checks. v1 -> v2: - Add pre-condition comment before the function as Junjie's suggestion. Signed-off-by: Kaige Fu <kaige.fu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -552,6 +552,14 @@ static void rebuild_vm0_e820(void)
|
||||
e820_mem.total_mem_size -= CONFIG_RAM_SIZE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param[inout] vm pointer to a vm descriptor
|
||||
*
|
||||
* @return 0 - on success
|
||||
*
|
||||
* @pre vm != NULL
|
||||
* @pre is_vm0(vm) == true
|
||||
*/
|
||||
int prepare_vm0_memmap_and_e820(struct vm *vm)
|
||||
{
|
||||
unsigned int i;
|
||||
@@ -565,9 +573,6 @@ int prepare_vm0_memmap_and_e820(struct vm *vm)
|
||||
IA32E_EPT_UNCACHED);
|
||||
struct e820_entry *entry;
|
||||
|
||||
|
||||
ASSERT(is_vm0(vm), "This func only for vm0");
|
||||
|
||||
rebuild_vm0_e820();
|
||||
dev_dbg(ACRN_DBG_GUEST,
|
||||
"vm0: bottom memory - 0x%llx, top memory - 0x%llx\n",
|
||||
|
Reference in New Issue
Block a user