From owner-freebsd-emulation@FreeBSD.ORG Sun Aug 17 19:08:02 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 534F4106564A for ; Sun, 17 Aug 2008 19:08:02 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id E3E1E8FC13 for ; Sun, 17 Aug 2008 19:08:01 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id BB84D68BB90 for ; Sun, 17 Aug 2008 21:06:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LARJboUisEra for ; Sun, 17 Aug 2008 21:06:07 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 027E76725A2 for ; Sun, 17 Aug 2008 21:06:06 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m7HJ66sw067653 for freebsd-emulation@freebsd.org; Sun, 17 Aug 2008 21:06:06 +0200 (CEST) (envelope-from rdivacky) Date: Sun, 17 Aug 2008 21:06:06 +0200 From: Roman Divacky To: freebsd-emulation@freebsd.org Message-ID: <20080817190606.GA67621@freebsd.org> References: <20080810072013.GA15196@dchagin.dialup.corbina.ru> <20080810115406.GR97161@deviant.kiev.zoral.com.ua> <20080810120424.GA15768@dchagin.dialup.corbina.ru> <20080810122124.GS97161@deviant.kiev.zoral.com.ua> <20080817181757.GA2940@dchagin.dialup.corbina.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080817181757.GA2940@dchagin.dialup.corbina.ru> User-Agent: Mutt/1.4.2.3i Subject: Re: x86_64 linuxulator patches X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2008 19:08:02 -0000 On Sun, Aug 17, 2008 at 10:17:57PM +0400, Chagin Dmitry wrote: > On Sun, Aug 10, 2008 at 03:21:24PM +0300, Kostik Belousov wrote: > > On Sun, Aug 10, 2008 at 04:04:24PM +0400, Chagin Dmitry wrote: > > > On Sun, Aug 10, 2008 at 02:54:06PM +0300, Kostik Belousov wrote: > > > > On Sun, Aug 10, 2008 at 11:20:13AM +0400, Chagin Dmitry wrote: > > > > > Hi, as promised, I place x86_64 linuxulator patches. > > > > > > > > > > here the basic patch: > > > > > http://78.107.232.239/linuxulator64-current.patch > > > > > > > > > > here recvmsg && sendmsg patch (not tested with really applications): > > > > > http://78.107.232.239/send-recv-msg.patch > > > > > > > > > > here master repository: > > > > > git://78.107.232.239/linuxulator > > > > > > > > > > and ports used for testing (and only for testing): > > > > > git://78.107.232.239/linux_base-f8 > > > > > git://78.107.232.239/linux_devel-f8 > > > > > git://78.107.232.239/linux_kdump-1.6 > > > > > > > > > > by default on amd64 builds i386 linuxulator, for build x86_64 use > > > > > cd sys/modules/linux > > > > > make -D COMPAT_LINUX64 > > > > > > > > > > for correct recognition of what linuxulator version is used > > > > > added new sysctl compat.linux.platform > > > > > for example use in ports Makefile's: > > > > > > > > > > LINUX_PLATFORM!= /sbin/sysctl -n compat.linux.platform 2>/dev/null > > > > > > > > > > .if ${LINUX_PLATFORM}x == "x" > > > > > IGNORE= linuxulator is not (kld)loaded > > > > > .elif ${LINUX_PLATFORM} == "i386" > > > > > LINUX_RPM_ARCH= i386 > > > > > .elif ${LINUX_PLATFORM} == "x86_64" > > > > > LINUX_RPM_ARCH= x86_64 > > > > > SFX= 64 > > > > > .else > > > > > IGNORE= ${LINUX_PLATFORM} is not supported > > > > > .endif > > > > > > > > > > I shal glad to remarks, proposals and results of testing. > > > > > thnx > > > > > > > > Reading your email, I got an impression that i386/linux and x86_64/linux > > > > ABI emulators are mutually exclusive. Is this right ? I think it would > > > > be most useful to be able to have them both in one kernel. > > > > > > yes, it so. if there are ports working only on i386 it's necessary > > > to do it. I don't know such ports :( > > > > Whether there is a _port_ that has no amd64 counterpart for i386 one is > > irrelevant there. The Linux ABI emulation is supposed to work not only with > > a software installed from port, but with most binaries. > > > > If emulating both ia32 and x86_64 simultaneously is technically feasible > > (and I believe it is), then both should be available. i386->amd64 is > > not the replacement step, this is an backward-compatible upgrade. > > Something few the interested participants of discussion :) > problem in that I am not familiar with a ports infrastructure... > > in my opinion the best decision for amd64 looks so. > we use two modules. linux.ko for x86_64 and linux32.ko for ia32, > option COMPAT_LINUX for x86_64 and COMPAT_LINUX32 for ia32. > and two linux_base directories: /compat/linux for x86_64 > and /compat/linux32 for ia32. I generally agree with that but the problem is that this breaks POLA... :(