From: Stefan Hajnoczi <stefanha@gmail.com>
To: Ayaz Akram <aaqemu@gmail.com>
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] QEMU to generate host binary
Date: Mon, 29 Jun 2015 16:13:52 +0100 [thread overview]
Message-ID: <20150629151352.GA24772@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <CAC0+NVZQtT_ZemBozi3PKePNGyHc0GtOHPYXej0=oXRHVsiFiA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 729 bytes --]
On Sun, Jun 28, 2015 at 07:29:39PM -0400, Ayaz Akram wrote:
> > Let's say qemu is running in System Emulation Mode, when it runs guest's
> > binary, it can log the translated code for host. Is it possible to merge
> > that translated code and other sections of guest's binary to make a binary
> > which can be run directly on host.
No, because of self-modifying code, run-time code loading, etc.
It is not possible to statically translate an executable (in the general
case).
There are architectures where it is possible due to restrictions (e.g.
no code loading, all jump destinations are known in advance, etc) but
the popular x86, ARM, etc architectures allow too much freedom to be
amenable to static translation.
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-06-29 15:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 19:33 [Qemu-devel] QEMU to generate host binary Ayaz Akram
2015-06-27 3:34 ` Peter Crosthwaite
[not found] ` <CAC0+NVaM-8W+WvDa+dHJVbomR3odwbMOCxZ98KHE=EV-8jpuXw@mail.gmail.com>
2015-06-28 23:29 ` Ayaz Akram
2015-06-29 15:13 ` Stefan Hajnoczi [this message]
2015-06-29 17:04 ` Peter Crosthwaite
2015-06-29 21:14 ` Ayaz Akram
2015-06-30 11:26 ` Dr. David Alan Gilbert
2015-06-30 12:21 ` Alex Bennée
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=20150629151352.GA24772@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=aaqemu@gmail.com \
--cc=peter.crosthwaite@xilinx.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).