1
0
mirror of https://github.com/momo5502/hypervisor.git synced 2025-07-05 10:41:50 +00:00

More progress

This commit is contained in:
momo5502
2022-04-14 20:47:40 +02:00
parent 2acac5bee2
commit e2f73e0aeb
10 changed files with 60 additions and 28 deletions

View File

@ -112,15 +112,4 @@ namespace memory
copy_address.PhysicalAddress.QuadPart = static_cast<int64_t>(address);
MmCopyMemory(destination, copy_address, length, MM_COPY_MEMORY_PHYSICAL, &result);
}
uint64_t query_process_physical_page(const uint32_t process_id, void* address,
uint8_t buffer[PAGE_SIZE])
{
const auto process_handle = process::find_process_by_id(process_id);
process::scoped_process_attacher attacher{process_handle};
memcpy(buffer, address, PAGE_SIZE);
return get_physical_address(address);
}
}