From 218a0a8b5dedc5c9f983cae65fc70e27dfcf6af0 Mon Sep 17 00:00:00 2001 From: Huihuang Shi Date: Thu, 21 Jun 2018 16:43:46 +0800 Subject: [PATCH] modified struct to fix "negative shift" The member of width in struct e820_entries,can be declared to uint32_t(the range of the member is bigger than 0) to avoid negative shift. Signed-off-by: Huihuang Shi Acked-by: Eddie Dong --- hypervisor/arch/x86/guest/guest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/arch/x86/guest/guest.c b/hypervisor/arch/x86/guest/guest.c index 7348a3308..2f1dd09f1 100644 --- a/hypervisor/arch/x86/guest/guest.c +++ b/hypervisor/arch/x86/guest/guest.c @@ -18,7 +18,7 @@ struct e820_mem_params e820_mem; struct page_walk_info { uint64_t top_entry; /* Top level paging structure entry */ int level; - int width; + uint32_t width; bool is_user_mode; bool is_write_access; bool is_inst_fetch;