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: Sergey Fedorov
Subject: Re: [Qemu-devel] log every write to register
Date: Tue, 17 Nov 2015 18:28:39 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 17.11.2015 16:12, Sergey Smolov wrote:
>
> 03.11.2015 20:29, Peter Crosthwaite пишет:
>> 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.
>
> Thank you for your answer!
> Could you explain the idea in a more detailed way?
> Which TCG generation functions should i hack for
> write-to-specific-regs logging?

As of general system/coprocessor registers you could first look at
target-arm/translate-a64.c:handle_sys() and
target-arm/translate.c:disas_coproc_insn().

Best regards,
Sergey



reply via email to

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