From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19X7TR-0007bT-K6 for qemu-devel@nongnu.org; Mon, 30 Jun 2003 18:50:13 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19X7Io-0005FZ-6w for qemu-devel@nongnu.org; Mon, 30 Jun 2003 18:39:14 -0400 Received: from gw.netgem.com ([195.68.2.34] helo=gw.dev.netgem.com) by monty-python.gnu.org with esmtp (Exim 4.20) id 19X7Hx-00055b-Jc for qemu-devel@nongnu.org; Mon, 30 Jun 2003 18:38:21 -0400 Received: from jma1.dev.netgem.com ([172.17.17.138] ident=jma) by gw.dev.netgem.com with esmtp (Exim 3.12 #1 (Debian)) id 19X7IL-00077d-00 for ; Tue, 01 Jul 2003 00:38:45 +0200 Subject: Re: [Qemu-devel] Misc patches for qemu From: Jocelyn Mayer In-Reply-To: <1056727770.32104.70.camel@gaston> References: <1056485922.4948.688.camel@jma1.dev.netgem.com> <20030626155856.084b5ff0.jrydberg@night.trouble.net> <1056659914.4967.787.camel@jma1.dev.netgem.com> <1056701931.32105.14.camel@gaston> <1056722122.4948.866.camel@jma1.dev.netgem.com> <1056727770.32104.70.camel@gaston> Content-Type: text/plain Message-Id: <1057012909.11615.283.camel@jma1.dev.netgem.com> Mime-Version: 1.0 Date: 01 Jul 2003 00:41:52 +0200 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , To: qemu mailing list Hi, sorry for the long delay... On Fri, 2003-06-27 at 17:29, Benjamin Herrenschmidt wrote: > > The goal for me is to be able to launch PPC programs including MacOS/MOL on a PC. > > I would also like to launch OS-X processes under ix86 Linux, without the need > > of the X kernel... A little help from inside the Linux kernel is needed, > > but it seems that it can be done (I didn't say easily !). > > I already have a few (native) BSD processes running under Linux using 2.4.20/21 kernels. > > As far as MOL is concerned, you don't want to "run it" within qemu/ppc, > but rather intergrate the CPU emulation inside of MOL. You can't just > "run" MOL like a normal program on PPC, it relies on a kernel module > doing the MMU virtualization among others, and you probably want to > avoid that when hosted on non-x86. But you'd have to talk to Samuel > about that You're absolutely right, concerning the fact that the emulation should better be in MOL, but I think that it would be a great thing to be able to run it without patching the host kernel. > Launching OS-X processes is another matter. (I mean just launching > processes and not the whole operating system within MOL). You have to > provide a syscall translation layer, of course, for the BSD-ish, but > a _lot_ of OS X apps also rely on some Mach kernel semantics, and > a few things like the Windows Server etc... will want to talk to > the IOKit via Mach messages. So there is significant work to do to > be able to run GUI OS X apps in linux (even on PPC) > > Ben. Once again, you're right. I started with BSD things to try to figure out the patches needed in the standard kernel to use personality in standard syscall paths. It's really simpler to do this than trying to emulate Mach and Apple PPC syscalls. I made some tries with a Mach-O loader I wrote and it appeared clearly that all OS-X apps need at least some basics Mach syscall to make dyld able to link the app. So the work to be done seems far to be simple and easy. For now, I have the syscall diverter, all syscall tables for FreeBSD, NetBSD OpenBSD and Darwin (including Mach syscalls, PPC ones and Darwin "private" ones) and a few BSD syscalls really implemented. I'll come back with this beautiful idea when I'll get Darwin ls or echo running on my PC :=) For now, I'm trying to find bugs in my PPC emulation for qemu until I can launch "real" processes and make it available as soon as possible... Regards. -- Jocelyn Mayer