forked from cheat-engine/cheat-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vmxoffload.h
134 lines (121 loc) · 5.58 KB
/
vmxoffload.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#ifndef VMXOFFLOAD_H
#define VMXOFFLOAD_H
void vmxoffload(PCWSTR dbvmimgpath);
VOID vmxoffload_passive (UINT_PTR param);
#pragma pack (1)
typedef struct _PTE
{
unsigned P : 1; // present (1 = present)
unsigned RW : 1; // read/write
unsigned US : 1; // user/supervisor
unsigned PWT : 1; // page-level write-through
unsigned PCD : 1; // page-level cache disabled
unsigned A : 1; // accessed
unsigned D : 1; // dirty
unsigned PAT : 1; // PAT
unsigned G : 1; // global page
unsigned A1 : 1; // available 1 aka copy-on-write
unsigned A2 : 1; // available 2/ is 1 when paged to disk
unsigned A3 : 1; // available 3
//unsigned PFN : 20; // page-frame number
} *PPTE;
typedef struct _PDE
{
unsigned P : 1; // present (1 = present)
unsigned RW : 1; // read/write
unsigned US : 1; // user/supervisor
unsigned PWT : 1; // page-level write-through
unsigned PCD : 1; // page-level cache disabled
unsigned A : 1; // accessed
unsigned D : 1; // dirty
unsigned PS : 1; // reserved (0)
unsigned G : 1; // reserved (0)
unsigned A1 : 1; // available 1 aka copy-on-write
unsigned A2 : 1; // available 2/ is 1 when paged to disk
unsigned A3 : 1; // available 3
//unsigned PFN : 20; // page-frame number
} *PPDE;
typedef struct _PDE2MB
{
unsigned P : 1; // present (1 = present)
unsigned RW : 1; // read/write
unsigned US : 1; // user/supervisor
unsigned PWT : 1; // page-level write-through
unsigned PCD : 1; // page-level cache disabled
unsigned A : 1; // accessed
unsigned reserved1 : 1; // reserved (0)
unsigned PS : 1; // reserved (0)
unsigned reserved3 : 1; // reserved (0)
unsigned A1 : 1; // available 1 aka copy-on-write
unsigned A2 : 1; // available 2/ is 1 when paged to disk
unsigned A3 : 1; // available 3
//unsigned PFN : 20; // page-frame number (>> 13 instead of >>12);
} *PPDE2MB;
typedef struct _PTE_PAE
{
unsigned P : 1; // present (1 = present)
unsigned RW : 1; // read/write
unsigned US : 1; // user/supervisor
unsigned PWT : 1; // page-level write-through
unsigned PCD : 1; // page-level cache disabled
unsigned A : 1; // accessed
unsigned D : 1; // dirty
unsigned PAT : 1; //
unsigned G : 1; // global page
unsigned A1 : 1; // available 1 aka copy-on-write
unsigned A2 : 1; // available 2/ is 1 when paged to disk
unsigned A3 : 1; // available 3
//the following 2 items cause a problem in ms's compiler
// unsigned PFN : 24; // page-frame number
//unsigned reserved : 28;
} *PPTE_PAE;
typedef struct _PDE_PAE
{
unsigned P : 1; // present (1 = present)
unsigned RW : 1; // read/write
unsigned US : 1; // user/supervisor
unsigned PWT : 1; // page-level write-through
unsigned PCD : 1; // page-level cache disabled
unsigned A : 1; // accessed
unsigned D : 1; // dirty
unsigned PS : 1; // pagesize
unsigned G : 1; // reserved (0)
unsigned A1 : 1; // available 1 aka copy-on-write
unsigned A2 : 1; // available 2/ is 1 when paged to disk
unsigned A3 : 1; // available 3
// unsigned PFN : 24; // page-frame number
// unsigned reserved4 : 28;
} *PPDE_PAE;
typedef struct _PDE2MB_PAE
{
unsigned P : 1; // present (1 = present)
unsigned RW : 1; // read/write
unsigned US : 1; // user/supervisor
unsigned PWT : 1; // page-level write-through
unsigned PCD : 1; // page-level cache disabled
unsigned A : 1; // accessed
unsigned reserved1 : 1; // reserved (0)
unsigned PS : 1; // reserved (0)
unsigned reserved3 : 1; // reserved (0)
unsigned A1 : 1; // available 1 aka copy-on-write
unsigned A2 : 1; // available 2/ is 1 when paged to disk
unsigned A3 : 1; // available 3
unsigned PAT : 1; //
//unsigned PFN : 23; // page-frame number (>> 13 instead of >>12);
//unsigned reserved4 : 28;
} *PPDE2MB_PAE;
typedef struct _PDPTE_PAE
{
unsigned char P : 1; // present (1 = present)
unsigned char RW : 1; // Read Write
unsigned char US : 1; // User supervisor
unsigned char PWT : 1; // page-level write-through
unsigned char PCD : 1; // page-level cache disabled
unsigned char reserved2 : 4; // reserved
unsigned char A1 : 1; // available 1 aka copy-on-write
unsigned char A2 : 1; // available 2/ is 1 when paged to disk
unsigned char A3 : 1; // available 3
//unsigned int PFN : 24; // page-frame number
//unsigned int reserved3 : 28;
} *PPDPTE_PAE;
#endif