From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IoUeB-0007Nc-Sl for qemu-devel@nongnu.org; Sat, 03 Nov 2007 21:51:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IoUeA-0007M2-9K for qemu-devel@nongnu.org; Sat, 03 Nov 2007 21:51:31 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IoUeA-0007Ls-5p for qemu-devel@nongnu.org; Sat, 03 Nov 2007 21:51:30 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IoUe9-0001fj-GJ for qemu-devel@nongnu.org; Sat, 03 Nov 2007 21:51:29 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [RFC] linux-user (mostly syscall.c) Date: Sun, 4 Nov 2007 01:51:08 +0000 References: <1194048343.2168.48.camel@phantasm.home.enterpriseandprosperity.com> <1194138960.2168.73.camel@phantasm.home.enterpriseandprosperity.com> <1194140125.16781.580.camel@rapid> In-Reply-To: <1194140125.16781.580.camel@rapid> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200711040151.09983.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "J. Mayer" , thayne@c2.net > 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. Paul