ufrisk/MemProcFS

DTB(pml4 level) custom user provide

Closed this issue · 3 comments

I know the VMMDLL_OPT_PROCESS_DTB can set the custom dtb addr(target phys memory) for a process.
But i want set the pml4(4KB) to use the bytes provide by the user(not the target host).The other 3 level tables(pdpt pd pt) still use the original(phys memory).
Can you solve this as a new feature.

I guess it would be possible to add support for this, or a more flexible system, in the future. I'll put it up as an enhancement request for now.

Great,thanks.

I added a memory callback interface to the C/C++ API that should be able to achieve what you wish, albeit in a slightly more complicated way. But it's also way more flexible.

https://github.com/ufrisk/MemProcFS/blob/1944968de816da4906363a2e17df2652000becce/vmm/vmmdll.h#L1070C8-L1070C9

VMMDLL_MemCallback(hVMM, VMMDLL_MEM_CALLBACK_READ_PHYSICAL_POST, NULL, CallbackMemCallback_PhysicalReadPost);

I hope this will work out fine for your needs. Since this is now added I'm closing the issue.