Skip to content

Commit 7109ab4

Browse files
mingqiangchilijinxia
authored andcommitted
hv:removed assert in free_ept_mem
Removed assert since the caller has checked the parameter. Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
1 parent a5121e9 commit 7109ab4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

hypervisor/arch/x86/ept.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ static uint64_t find_next_table(uint32_t table_offset, void *table_base)
4343
return sub_table_addr;
4444
}
4545

46+
/**
47+
* @pre pml4_addr != NULL
48+
*/
4649
static void free_ept_mem(void *pml4_addr)
4750
{
4851
void *pdpt_addr;
@@ -52,11 +55,6 @@ static void free_ept_mem(void *pml4_addr)
5255
uint32_t pdpt_index;
5356
uint32_t pde_idx;
5457

55-
if (pml4_addr == NULL) {
56-
ASSERT(false, "EPTP is NULL");
57-
return;
58-
}
59-
6058
for (pml4_index = 0U; pml4_index < IA32E_NUM_ENTRIES; pml4_index++) {
6159
/* Walk from the PML4 table to the PDPT table */
6260
pdpt_addr = HPA2HVA(find_next_table(pml4_index, pml4_addr));

0 commit comments

Comments
 (0)