qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] QEMU as a binary disassembler
@ 2011-09-20  2:11 Xin Tong
  2011-09-20  2:21 ` 陳韋任
  2011-09-20  5:35 ` Lei Li
  0 siblings, 2 replies; 3+ messages in thread
From: Xin Tong @ 2011-09-20  2:11 UTC (permalink / raw)
  To: qemu-devel

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

One of the research projects I am doing involves disassembling machine
instructions (such as PTX ) to TCG IR and use the QEMU backends to generate
code I need. Basically, I am planning to use QEMU as a dynamic translators,
instead of the full system emulation it is developed for. I need a way to
hack out the piece of QEMU used specifically for dyn translations so that i
do not need a machine image to start the dyn trans parts of QEMU. I am
fairly familiar with the QEMU code base. I would like to hear suggestions.

Thanks

Xin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] QEMU as a binary disassembler
  2011-09-20  2:11 [Qemu-devel] QEMU as a binary disassembler Xin Tong
@ 2011-09-20  2:21 ` 陳韋任
  2011-09-20  5:35 ` Lei Li
  1 sibling, 0 replies; 3+ messages in thread
From: 陳韋任 @ 2011-09-20  2:21 UTC (permalink / raw)
  To: Xin Tong; +Cc: qemu-devel

> One of the research projects I am doing involves disassembling machine
> instructions (such as PTX ) to TCG IR and use the QEMU backends to generate
> code I need. Basically, I am planning to use QEMU as a dynamic translators,
> instead of the full system emulation it is developed for. I need a way to
> hack out the piece of QEMU used specifically for dyn translations so that i
> do not need a machine image to start the dyn trans parts of QEMU. I am
> fairly familiar with the QEMU code base. I would like to hear suggestions.

  For arch xyz, see target-xyz/translate.c. It does guest binary to TCG
ops translation.

  If your PTX means CUDA PTX, I think QEMU doesn't support such target
currently.

Regards,
chenwj 

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] QEMU as a binary disassembler
  2011-09-20  2:11 [Qemu-devel] QEMU as a binary disassembler Xin Tong
  2011-09-20  2:21 ` 陳韋任
@ 2011-09-20  5:35 ` Lei Li
  1 sibling, 0 replies; 3+ messages in thread
From: Lei Li @ 2011-09-20  5:35 UTC (permalink / raw)
  To: Xin Tong; +Cc: qemu-devel

On 09/20/2011 10:11 AM, Xin Tong wrote:
> One of the research projects I am doing involves disassembling machine 
> instructions (such as PTX ) to TCG IR and use the QEMU backends to 
> generate 
PTX, do you mean Parallel Thread Execution, a pseudo-assembly language
for NVIDIA GPUs?

> code I need. Basically, I am planning to use QEMU as a dynamic 
> translators, instead of the full system emulation it is developed for. 
> I need a way to hack 
In TCG, the whole translation has two parts: blocks of target code be rewritten
in tcg ops, a kind of machine independent intermediate notation, then this notation
be compiled for the host's architecture by TCG.

TCG requires that there be dedicated code written to support every architecture
it is being run on. It also requires that the target instruction translation be
rewritten to take advantage of TCG ops.

As I know, PTX is not machine code but a typed intermediate language, to some extend,
target dependent(it contains a lots of GPU-specific instructions), and till now TCG did
not support such target.
If you wanna translate PTX to the code you need, the only idea pops into my mind is:
maybe you have to write tcg ops code for PTX yourself...  :-)

> out the piece of QEMU used specifically for dyn translations so that i 
> do not need a machine image to start the dyn trans parts of QEMU. I am 
> fairly familiar with the QEMU code base. I would like to hear 
> suggestions.
>
> Thanks
>
> Xin
>
-- 

Lei

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-20  5:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-20  2:11 [Qemu-devel] QEMU as a binary disassembler Xin Tong
2011-09-20  2:21 ` 陳韋任
2011-09-20  5:35 ` Lei Li

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).