问题
I am working on a project where I need to translate qemu-guest
physical addresses to host virtual/physical addresses.
I am using VMI (virtual machine introspection) to introspect into the qemu process (the KVM VM) and to read guest physical addresses stored in virtio ring buffer descriptors. Therefore, I am looking for a simple way to translate the qemu physical addresses to host virtual addresses at the host side. (i.e., to extract as less info as possible from the qemu process).
I read online that in previous versions, qemu stored the physical RAM base in the variable phys_ram_base
, so that the host virtual address could be obtained as follows:
host_virtual = phys_ram_base + guest_physical_address
Is something like this possible in newer versions of qemu (e.g., how could I obtain the qemu-physical base address -- the former phys_ram_base
?)
来源:https://stackoverflow.com/questions/41860920/qemu-kvm-translation-of-guest-physical-address-to-host-virtual-host-physical-ad