From e85ee6dbb1e24798003b6321b2bb886cd32a32bd Mon Sep 17 00:00:00 2001 From: Zero Hu <632284304@qq.com> Date: Mon, 3 Jan 2022 12:27:06 +0000 Subject: [PATCH] Replace mm.cpp --- Voyager/PayLoad (Intel)/mm.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Voyager/PayLoad (Intel)/mm.cpp b/Voyager/PayLoad (Intel)/mm.cpp index fd0e729..8ad2ad3 100644 --- a/Voyager/PayLoad (Intel)/mm.cpp +++ b/Voyager/PayLoad (Intel)/mm.cpp @@ -144,7 +144,7 @@ auto mm::translate_guest_physical(guest_phys_t phys_addr, map_type_t map_type) - const auto epdpt_large = reinterpret_cast(map_page( epml4[guest_phys.pml4_index].page_frame_number << 12, map_type)); - + // handle 1gb page... if (epdpt_large[guest_phys.pdpt_index].large_page) return (epdpt_large[guest_phys.pdpt_index].page_frame_number @@ -184,7 +184,13 @@ auto mm::init() -> vmxroot_error_t const auto pt_phys = translate(reinterpret_cast(pt)); - if (!pdpt_phys || !pd_phys || !pt_phys) + const auto shadHookData_phys = + translate(reinterpret_cast(&ShadowHookData)); + + const auto shadow_phys = + translate(reinterpret_cast(&shadow)); + + if (!pdpt_phys || !pd_phys || !pt_phys || !shadHookData_phys || !shadow_phys) return vmxroot_error_t::invalid_host_virtual; // setup mapping page table entries...