From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43174 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oj7Rs-0007jN-H9 for qemu-devel@nongnu.org; Wed, 11 Aug 2010 05:18:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oj7Ro-0005d0-2T for qemu-devel@nongnu.org; Wed, 11 Aug 2010 05:18:12 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:56173) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oj7Rn-0005ca-Mq for qemu-devel@nongnu.org; Wed, 11 Aug 2010 05:18:08 -0400 Message-ID: <4C626AC8.8050908@mail.berlios.de> Date: Wed, 11 Aug 2010 11:18:00 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] Running the user emulation References: <4C626277.803@mail.berlios.de> In-Reply-To: Content-Type: multipart/alternative; boundary="------------070608070004010304000000" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: C K Kashyap Cc: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------070608070004010304000000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Am 11.08.2010 11:06, schrieb C K Kashyap: > Let me see if I understand this right - > > qemu loads the a.out and begins to interpret the x86 instructions in > the a.out and when a system call happens, it makes the call the host > system .... is that right? > Right. That's the way how linux user mode emulation (for example qemu-i386) works. See linux-user/syscall.c if you want to see more details. bsd-user and darwin-user are also supported (more or less), but darwin-user only supports translation of darwin/powerpc to darwin/x86 syscalls. It won't help you to run a linux a.out on your mac. > > > On Wed, Aug 11, 2010 at 2:12 PM, Stefan Weil > wrote: > > Am 11.08.2010 10:31, schrieb C K Kashyap: >> Hi, >> I've built qemu on my mac osx using this config - >> ./configure --prefix=/Users/ckk/local/ >> --target-list="i386-softmmu x86_64-softmmu" --enable-linux-user >> >> Now, I have a simple a.out built on linux - how can I run it >> using qemu on my mac box? >> >> -- >> Regards, >> Kashyap > > Hi Kashyap, > > you cannot run it in user mode emulation unless you replace Mac OS > by Linux > on your mac box. Linux user emulations requires a Linux host. > > If you have a Linux host, you would need > --target-list=i386-linux-user. > > You can run your a.out if you run system emulation (e.g. > i386-softmmu/qemu) > and install Linux there, of course. > > Regards, > Stefan > > > > > -- > Regards, > Kashyap --------------070608070004010304000000 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Am 11.08.2010 11:06, schrieb C K Kashyap:
Let me see if I understand this right -

qemu loads the a.out and begins to interpret the x86 instructions in the a.out and when a system call happens, it makes the call the host system .... is that right?



Right. That's the way how linux user mode emulation (for example qemu-i386) works.
See linux-user/syscall.c if you want to see more details.

bsd-user and darwin-user are also supported (more or less), but darwin-user
only supports translation of darwin/powerpc to darwin/x86 syscalls.
It won't help you to run a linux a.out on your mac.



On Wed, Aug 11, 2010 at 2:12 PM, Stefan Weil <weil@mail.berlios.de> wrote:
Am 11.08.2010 10:31, schrieb C K Kashyap:
Hi,
I've built qemu on my mac osx using this config -
./configure --prefix=/Users/ckk/local/ --target-list="i386-softmmu x86_64-softmmu" --enable-linux-user

Now, I have a simple a.out built on linux - how can I run it using qemu on my mac box?

--
Regards,
Kashyap

Hi Kashyap,

you cannot run it in user mode emulation unless you replace Mac OS by Linux
on your mac box. Linux user emulations requires a Linux host.

If you have a Linux host, you would need --target-list=i386-linux-user.

You can run your a.out if you run system emulation (e.g. i386-softmmu/qemu)
and install Linux there, of course.

Regards,
Stefan



--
Regards,
Kashyap

--------------070608070004010304000000--