qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC] linux-user (mostly syscall.c)


From: J. Mayer
Subject: Re: [Qemu-devel] [RFC] linux-user (mostly syscall.c)
Date: Sun, 04 Nov 2007 08:49:46 +0100

On Sun, 2007-11-04 at 01:51 +0000, Paul Brook wrote:
> > If you take a close look, you'll find more variations between Linux ABIs
> > for different CPUs than between all BSD implementations: common syscalls
> > of all BSD flavors do the same thing (and have the same ABI whatever the
> > CPU...). You'll also find very few variations between the syscalls
> > common to BSD & Linux because most of those directly map POSIX defined
> > functions.
> > Then, following the given argument, we never should try to share any
> > code between linux-user for different targets, as the Linux ABI and
> > behavior is different for different CPUs...
> 
> I'd guess that the ones that are all the same are the ones that don't take 
> any 
> real effort to implement in the first place.
> 
> If you can combine the implementations I'd also expect to be able to do cross 
> emulation. e.g. run *BSD applications on a Linux host. This definitely works 
> for simple cases, even in the extreme case of a windows host - as you say 
> many syscalls map directly onto POSIX functions so there is only ever one 
> implementation. Whether it works well enough for real applications or whole 
> distributions of software I'm not so sure. If you can't do cross emulation 
> I'm sceptical about how much they can be combined.

Ooops... I should have been more precise. In my idea, it was
"BSD-on-Linux" I was talking about. Let's say OpenBSD / NetBSD. FreeBSD
has some specific tricks that might be difficult to map on Linux (or
even other BSD), not even talking of Darwin which is quite impossible to
emulate (or if one wants to emulate the IOkit...). The main difficulty
of emulating BSD on Linux is the sysctl syscall, the trace facilites and
the ioctls. I guess we can forget the ioctls... Most of the other
syscalls mappings are quite like mapping one Linux port to another.

-- 
J. Mayer <address@hidden>
Never organized





reply via email to

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