1
0
mirror of https://github.com/momo5502/hypervisor.git synced 2025-07-04 10:11:51 +00:00

Move ept logic into ept module

This commit is contained in:
momo5502
2022-04-13 19:06:38 +02:00
parent d5a5d61c8d
commit fd03a49992
8 changed files with 215 additions and 161 deletions

View File

@ -23,6 +23,8 @@ namespace memory
_IRQL_requires_max_(DISPATCH_LEVEL)
void free_non_paged_memory(void* memory);
void copy_physical_data(uint64_t address, void* destination, size_t length);
uint64_t query_process_physical_page(uint32_t process_id, void* address, uint8_t buffer[PAGE_SIZE]);
template <typename T, typename... Args>
@ -47,3 +49,18 @@ namespace memory
}
}
}
inline uint64_t operator"" _kb(const uint64_t size)
{
return size * 1024;
}
inline uint64_t operator"" _mb(const uint64_t size)
{
return operator"" _kb(size * 1024);
}
inline uint64_t operator"" _gb(const uint64_t size)
{
return operator"" _mb(size * 1024);
}