[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Misc patches for qemu

From: Jocelyn Mayer
Subject: Re: [Qemu-devel] Misc patches for qemu
Date: 01 Jul 2003 00:41:52 +0200


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




Jocelyn Mayer <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]