Skip to content

Commit a68850e

Browse files
JasonChenCJjren1
authored andcommitted
mmu: replace ASSERT with panic in fetch_page_table_offset
all callers for fetch_page_table_offset should already make sure it will not come to an unknown table_leve, so just panic here. Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
1 parent c2f86f2 commit a68850e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hypervisor/arch/x86/mmu.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,10 @@ static uint32_t fetch_page_table_offset(void *addr, uint32_t table_level)
325325
break;
326326

327327
default:
328-
pr_err("Wrong page table level = 0x%lx", table_level);
329-
ASSERT(false, "Wrong page table level");
328+
/* all callers should already make sure it will not come
329+
* to here
330+
*/
331+
panic("Wrong page table level");
330332
break;
331333
}
332334

0 commit comments

Comments
 (0)