From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VcaEl-0003wS-CS for qemu-devel@nongnu.org; Sat, 02 Nov 2013 08:23:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VcaEe-0004FU-1e for qemu-devel@nongnu.org; Sat, 02 Nov 2013 08:23:31 -0400 Received: from mail-ea0-f170.google.com ([209.85.215.170]:62072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VcaEd-0004FO-RM for qemu-devel@nongnu.org; Sat, 02 Nov 2013 08:23:23 -0400 Received: by mail-ea0-f170.google.com with SMTP id q10so2115288eaj.1 for ; Sat, 02 Nov 2013 05:23:22 -0700 (PDT) Received: from [10.0.1.3] ([109.86.78.210]) by mx.google.com with ESMTPSA id h45sm20005006eeg.5.2013.11.02.05.23.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Nov 2013 05:23:21 -0700 (PDT) Message-ID: <5274EEB4.6080606@progger.ru> Date: Sat, 02 Nov 2013 14:23:16 +0200 From: Lex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] using qemu binary translation to run I386 code under x86_64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi all, I am new to the list and to qemu development in general, so my question might be discussed already (though I failed to find an answer in archives, thus writing here). I want to use qemu to execute x86 32-bit binary code inside of x86_64 process under OS X. In future, I would like to be able to execute the same code on other architectures (not x86). Background: I have a library written in 32-bit intel assembly which does not use any system calls (just computations). Eventhough sources are available, there is no plans to rewrite it into C, because code is very ancient, parts are received from reverse-engineering/disasming (and thus are unmaintainable) etc. Up until recently, I was using helper 32-bit executable, interfacing with it through stdandart input/output from 64-bit process. It is no longer an option unfortunately. Is it possible to: 1. set up memory of target CPU (load the binary, write in function arguments) 2. using qemu, call the function from the library 3. read memory of target CPU (get data, returned by the function). Thing is that I don't need full system emulation (hardware, bios, etc) - that would be an overkill. qemu usermode looks very promising in that regard, but it seems support for darwin was removed... So, I wonder whether things I am asking are already possible and how much efford it might require? Thanks in advance for all your help! Lex