qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Translated Basic Block Instrumentation
@ 2009-10-07 13:21 Jiaqing Du
  0 siblings, 0 replies; only message in thread
From: Jiaqing Du @ 2009-10-07 13:21 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 829 bytes --]

Hi list,

I'm working on the instrumentation of each (translated) basic block. The
host arch is x86_64. At the beginning of each translated basic block, I
added some instructions to do some accounting. Then under some conditions I
need to raise an NMI inside a translated basic block. The following is (part
of ) what I added to tcg_gen_code_common().

    /* movq EXCP02_NMI,%rdi */
    tcg_out_movi(s, TCG_TYPE_I64, TCG_REG_RDI, EXCP02_NMI);

    /* callq helper_raise_interrupt(EXCP02_NMI) */
    tcg_out8(s, 0xe8);
    tcg_out32(s, (tcg_target_long)raise_exception -
(tcg_target_long)s->code_ptr - 4);


It seems that this NMI is not handled properly in cpu_exec(). I also tried
cpu_interrupt(), this also did not work. What I want to do is to raise an
NMI inside a translated basic block, any suggestions?


Thanks,
Jiaqing

[-- Attachment #2: Type: text/html, Size: 896 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-07 13:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07 13:21 [Qemu-devel] Translated Basic Block Instrumentation Jiaqing Du

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).