qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC] Tracing guest register usage


From: Lluís Vilanova
Subject: [Qemu-devel] [RFC] Tracing guest register usage
Date: Wed, 28 Sep 2016 15:21:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi! I've kept working on extending the guest instruction tracing features, and
added support to trace which registers are read/written by guest instructions
(when executing with TCG).

I've basically extended "tcg_global_mem_new_*" to associate global TCG registers
with a guest (vCPU) register number (*), and track all TCG opcodes that access
the values of these global TCG registers.

(*) This "mapping" is necessary because targets like i386 have multiple global
    TCG registers (cc_dst, cc_src, ...) that correspond to a single guest
    register (eflags).

While enough, I'm wondering if extending "tcg_global_mem_new_*" to set that
mapping is the proper way to go. For example, gdbstub also has some form of
guest (vCPU) register descriptors, but only for some of the targets.

So the question is wether it's worth generalizing this to some register
descriptors in CPUClass, that can be used by all QEMU's subsystems.


Cheers,
  Lluis



reply via email to

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