From: Jiaqing Du <jiaqing@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Translated Basic Block Instrumentation
Date: Wed, 7 Oct 2009 15:21:09 +0200 [thread overview]
Message-ID: <6d8082040910070621gc3a6be6h6128b232938ed54d@mail.gmail.com> (raw)
[-- 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 --]
reply other threads:[~2009-10-07 13:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d8082040910070621gc3a6be6h6128b232938ed54d@mail.gmail.com \
--to=jiaqing@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).