qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] log every write to register


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] log every write to register
Date: Tue, 3 Nov 2015 08:29:22 -0800

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.

Regards,
Peter

> thanks
> -- PMM
>



reply via email to

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