虚拟地址到物理地址的转换
Translation of virtual address to physical address
我有一个问题,我们如何转换虚拟地址并获得该地址到物理内存位置的映射。
我在 Qemu 上有一个 Windows VM 运行,它托管在我的 Ubuntu Linux 系统上。我想知道我们如何将 Windows VM 上的程序 运行 映射到 host/Linux 机器上的物理内存位置。
我们如何进行这种虚拟到物理的映射?
感谢并提前。
how can we translate the virtual address and get a mapping of that address to the physical memory location.
在 windows 中,您可以使用内核调试器 "KD" 从虚拟中找到物理地址( Windows SDK: https://msdn.microsoft.com/en-us/library/windows/hardware/ff539310(v=vs.85).aspx "Converting Virtual Addresses to Physical Addresses" or http://resources.infosecinstitute.com/translating-virtual-to-physical-address-on-windows-physical-addresses/ 的一部分:
Address Conversion Using !vtop
. Suppose you are debugging a target computer on which the MyApp.exe process is running and you want to investigate the virtual address 0x0012F980. Here is the procedure you would use with the !vtop extension to determine the corresponding physical address.
在linux中有/proc/pid/pagemap
文件(其中pid是目标进程的进程ip——你应该知道每个进程都有自己的virtual-to-physical映射),并且有post 关于页面映射解析:http://fivelinesofcode.blogspot.ru/2014/03/how-to-translate-virtual-to-physical.html
I have a Windows VM running on Qemu which is hosted on my Ubuntu Linux system.
在你的例子中有两个嵌套 OS。 Windows OS 中有一些 windows 应用程序。 Windows OS 认为它有一些物理内存;但实际上它是 Qemu 模拟器对物理内存的模拟。
Qemu(在最简单的 non-accelerated 情况下)只是 linux 中的用户应用程序之一;它只有来自 Linux 的虚拟内存。因此,为 Windows 模拟为物理(guest-physical)的内存实际上是 host-virtual(但它不是一对一的映射,也有一些 [=36 的 qemu 翻译=],它可能将 guest-physical 的巨大区域映射到 host-virtual -http://blog.vmsplice.net/2016/01/qemu-internals-how-guest-physical-ram.html; check also Print range of memory addresses in qemu).
I want to know how can we map programs running on Windows VM to a physical memory location on the host/Linux machine.
使用Windows KD 调试器将guest-virtual 地址从内部程序转换为guest-physical 地址。然后使用qemu命令行查找,如何qemu mapped guest-physical to virtual memory of qemu process(到host-virtual),得到host-virtual地址并用pagemap
特殊文件从
/proc/`pidof qemu-system-x86_64`/pagemap
我有一个问题,我们如何转换虚拟地址并获得该地址到物理内存位置的映射。
我在 Qemu 上有一个 Windows VM 运行,它托管在我的 Ubuntu Linux 系统上。我想知道我们如何将 Windows VM 上的程序 运行 映射到 host/Linux 机器上的物理内存位置。
我们如何进行这种虚拟到物理的映射?
感谢并提前。
how can we translate the virtual address and get a mapping of that address to the physical memory location.
在 windows 中,您可以使用内核调试器 "KD" 从虚拟中找到物理地址( Windows SDK: https://msdn.microsoft.com/en-us/library/windows/hardware/ff539310(v=vs.85).aspx "Converting Virtual Addresses to Physical Addresses" or http://resources.infosecinstitute.com/translating-virtual-to-physical-address-on-windows-physical-addresses/ 的一部分:
Address Conversion Using
!vtop
. Suppose you are debugging a target computer on which the MyApp.exe process is running and you want to investigate the virtual address 0x0012F980. Here is the procedure you would use with the !vtop extension to determine the corresponding physical address.
在linux中有/proc/pid/pagemap
文件(其中pid是目标进程的进程ip——你应该知道每个进程都有自己的virtual-to-physical映射),并且有post 关于页面映射解析:http://fivelinesofcode.blogspot.ru/2014/03/how-to-translate-virtual-to-physical.html
I have a Windows VM running on Qemu which is hosted on my Ubuntu Linux system.
在你的例子中有两个嵌套 OS。 Windows OS 中有一些 windows 应用程序。 Windows OS 认为它有一些物理内存;但实际上它是 Qemu 模拟器对物理内存的模拟。
Qemu(在最简单的 non-accelerated 情况下)只是 linux 中的用户应用程序之一;它只有来自 Linux 的虚拟内存。因此,为 Windows 模拟为物理(guest-physical)的内存实际上是 host-virtual(但它不是一对一的映射,也有一些 [=36 的 qemu 翻译=],它可能将 guest-physical 的巨大区域映射到 host-virtual -http://blog.vmsplice.net/2016/01/qemu-internals-how-guest-physical-ram.html; check also Print range of memory addresses in qemu).
I want to know how can we map programs running on Windows VM to a physical memory location on the host/Linux machine.
使用Windows KD 调试器将guest-virtual 地址从内部程序转换为guest-physical 地址。然后使用qemu命令行查找,如何qemu mapped guest-physical to virtual memory of qemu process(到host-virtual),得到host-virtual地址并用pagemap
特殊文件从
/proc/`pidof qemu-system-x86_64`/pagemap