On Tue, Nov 3, 2015 at 8:14 AM, Peter Maydell <address@hidden> wrote:
On 3 November 2015 at 13:17, Sergey Smolov <address@hidden> wrote:
I have a collection of ARMv8 register names. I need to add special logging
mode to QEMU so that every time it is enabled, every write access to any of
the specified registers will produce a new record to log, including register
name and a value to be written.
Is it possible to accomplish such a task? If yes, where shall I find
functions that implement "writing to register" functionality?
This is difficult, because we don't have a single convenient
location which all register accesses go through. (General purpose
registers and some system registers will be optimised so that
accesses are made directly from JIT generated code.)
You may be able to hack the TCG generation functions to call out to
helper context (which implements your log) on each op that updates
your specific regs. It will kill performance though if those registers
are hot.