1
0
mirror of https://github.com/momo5502/hypervisor.git synced 2025-07-03 17:51:52 +00:00

Reflect memory writes to shadow page

This commit is contained in:
momo5502
2022-05-15 13:07:17 +02:00
parent 489fba2b60
commit 76fcdd0d8e
4 changed files with 73 additions and 5 deletions

View File

@ -26,9 +26,14 @@ namespace vmx
struct ept_hook
{
ept_hook(const uint64_t physical_base);
~ept_hook();
DECLSPEC_PAGE_ALIGN uint8_t fake_page[PAGE_SIZE]{};
DECLSPEC_PAGE_ALIGN uint8_t diff_page[PAGE_SIZE]{};
uint64_t physical_base_address{};
void* mapped_virtual_address{};
pml1* target_page{};
pml1 original_entry{};
@ -89,7 +94,7 @@ namespace vmx
pml1* find_pml1_table(uint64_t physical_address) const;
ept_split* allocate_ept_split();
ept_hook* allocate_ept_hook();
ept_hook* allocate_ept_hook(uint64_t physical_address);
ept_hook* find_ept_hook(uint64_t physical_address) const;
ept_hook* get_or_create_ept_hook(void* destination, ept_translation_hint* translation_hint = nullptr);