From ab239c749056715176ae6af36360889344570840 Mon Sep 17 00:00:00 2001 From: Zero Hu <632284304@qq.com> Date: Mon, 3 Jan 2022 12:27:25 +0000 Subject: [PATCH] Replace mm.h --- Voyager/PayLoad (Intel)/mm.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Voyager/PayLoad (Intel)/mm.h b/Voyager/PayLoad (Intel)/mm.h index 099850c..827f6fe 100644 --- a/Voyager/PayLoad (Intel)/mm.h +++ b/Voyager/PayLoad (Intel)/mm.h @@ -1,6 +1,8 @@ #pragma once -#include "types.h" #include "debug.h" +#include "ept.h" + +#define MAX_CPU_COUNT 256 //最多多少个核 #define SELF_REF_PML4_IDX 510 #define MAPPING_PML4_IDX 100 @@ -14,7 +16,8 @@ #pragma section(".pdpt", read, write) #pragma section(".pd", read, write) #pragma section(".pt", read, write) - +#pragma section(".shadowhook",read,write) +#pragma section(".shadowpte",read,write) namespace mm { enum class map_type_t @@ -145,6 +148,10 @@ namespace mm __declspec(allocate(".pdpt")) inline pdpte pdpt[512]; __declspec(allocate(".pd")) inline pde pd[512]; __declspec(allocate(".pt")) inline pte pt[512]; + __declspec(allocate(".shadowhook")) inline SharedShadowHookData ShadowHookData; + __declspec(allocate(".shadowpte")) inline ShadowPte shadow[MAX_HOOKS]; + //__declspec(allocate(".shadMrk")) inline bool shadowMark[256][4]; + inline const ppml4e hyperv_pml4{ reinterpret_cast(SELF_REF_PML4) };