From 7109ab45a66390396a170b0d1973a0c855a028e8 Mon Sep 17 00:00:00 2001 From: Mingqiang Chi Date: Mon, 6 Aug 2018 16:58:38 +0800 Subject: [PATCH] hv:removed assert in free_ept_mem Removed assert since the caller has checked the parameter. Signed-off-by: Mingqiang Chi --- hypervisor/arch/x86/ept.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hypervisor/arch/x86/ept.c b/hypervisor/arch/x86/ept.c index 33e10f130..860d5bc84 100644 --- a/hypervisor/arch/x86/ept.c +++ b/hypervisor/arch/x86/ept.c @@ -43,6 +43,9 @@ static uint64_t find_next_table(uint32_t table_offset, void *table_base) return sub_table_addr; } +/** + * @pre pml4_addr != NULL + */ static void free_ept_mem(void *pml4_addr) { void *pdpt_addr; @@ -52,11 +55,6 @@ static void free_ept_mem(void *pml4_addr) uint32_t pdpt_index; uint32_t pde_idx; - if (pml4_addr == NULL) { - ASSERT(false, "EPTP is NULL"); - return; - } - for (pml4_index = 0U; pml4_index < IA32E_NUM_ENTRIES; pml4_index++) { /* Walk from the PML4 table to the PDPT table */ pdpt_addr = HPA2HVA(find_next_table(pml4_index, pml4_addr));