Skip to contentSkip to conversation

Get virtual memory value

Qemu-devel Alexander Basov 2 participants 3 messages Apr 28, 2009 – May 5, 2009

lore
Share & tools
lore
#0 lore raw

Hello.
I'm new in qemu internals, and I'd like to know, how can I get a value, which is stored in virtual memory address, allocated by guest OS.

Thanks.

#1 lore raw
Quoted 3 lines · Alexander Basov

Hello.
I'm new in qemu internals, and I'd like to know, how can I get a value, which is stored in virtual memory address, allocated by guest OS.

It's possible using the 'memsave' command in the console.

We expose this through libvirt:

http://libvirt.org/html/libvirt-libvirt.html#virDomainMemoryPeek

Rich.

Signature · 4 lines
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
author
#2 lore raw

28.04.2009 16:39, Richard W.M. Jones ?????:

Quoted 7 lines · Alexander Basov
Quoted 5 lines

Hello.
I'm new in qemu internals, and I'd like to know, how can I get a value, which is stored in virtual memory address, allocated by guest OS.

Quoted 9 lines

It's possible using the 'memsave' command in the console.

We expose this through libvirt:

http://libvirt.org/html/libvirt-libvirt.html#virDomainMemoryPeek

Rich.

It is not exactly what i need.
I have some virtual memory address inside qemu. I need to get value, which is stored in this address.

I'm trying to do as follow
1. Get phys address of given virtual address into tmp_addr get_phys_addr (env, address, access_type, is_user, &tmp_addr,
&tmp_prot);

2. read value of which is stored in physical address (tmp_addr) cpu_physical_memory_read (tmp_addr, &result, 1);

Is it correct way?