qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] How does cpu_ldx_data translate virtual->physical?


From: Martin T
Subject: [Qemu-devel] How does cpu_ldx_data translate virtual->physical?
Date: Sat, 16 Nov 2013 11:12:57 +0100

Hello

I'm new to the list and I'm looking to do some qemu hacking... so I'm reading through the sources. I've noticed that when e.g. helper functions for instructions need to read from the memory of the guest address space (for instance, based on an address passed in an operand) they use macros of the form cpu_ldx_data (for instance cpu_ldq_data to read a qword). So I was looking to use this as a starting point for understanding address translation in qmu. However, I'm a bit confused because the macro seems to be defined just by:

#define cpu_ldq_data(env, addr) ldq_raw(addr)

I.e. throwing the env argument away - and ldq_raw() seems to just read straight from this address in qemu's own address space (not even the 'emulated' address space).

So I'm thinking there must be some other place where cpu_ldq_data() gets defined which does something else, however, I haven't been able to find it searching through the sources.

Can anyone help on this? Thanks!

- Morty

reply via email to

[Prev in Thread] Current Thread [Next in Thread]