From owner-freebsd-emulation@FreeBSD.ORG Mon Mar 19 17:19:42 2007 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2550716A402 for ; Mon, 19 Mar 2007 17:19:42 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from thumbler.kulnet.kuleuven.ac.be (thumbler.kulnet.kuleuven.ac.be [134.58.240.45]) by mx1.freebsd.org (Postfix) with ESMTP id 8AC0413C4BF for ; Mon, 19 Mar 2007 17:19:41 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from localhost (localhost [127.0.0.1]) by thumbler.kulnet.kuleuven.ac.be (Postfix) with ESMTP id C99331382B8; Mon, 19 Mar 2007 18:19:39 +0100 (CET) Received: from smtp02.kuleuven.be (lepidus.kulnet.kuleuven.ac.be [134.58.240.72]) by thumbler.kulnet.kuleuven.ac.be (Postfix) with ESMTP id 991201380C4; Mon, 19 Mar 2007 18:19:38 +0100 (CET) Received: from kalimero.kotnet.org (kalimero.kotnet.org [10.4.16.222]) by smtp02.kuleuven.be (Postfix) with ESMTP id C47CF2CAADA; Mon, 19 Mar 2007 18:19:34 +0100 (CET) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.13.8/8.13.8) with ESMTP id l2JHJW28001997; Mon, 19 Mar 2007 18:19:32 +0100 (CET) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-emulation@freebsd.org Date: Mon, 19 Mar 2007 18:19:29 +0100 User-Agent: KMail/1.9.6 References: <20070316120038.2iizia24mc4wcw8s@webmail.leidinger.net> <200703171429.25551.tijl@ulyssis.org> <200703191213.31197.jkim@FreeBSD.org> In-Reply-To: <200703191213.31197.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200703191819.31766.tijl@ulyssis.org> X-Virus-Scanned: by KULeuven Antivirus Cluster Cc: Alexander Leidinger , rdivacky@freebsd.org, kib@freebsd.org, Jung-uk Kim Subject: Re: 2.6.16 for linuxulator & 7.0 release 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: Mon, 19 Mar 2007 17:19:42 -0000 On Monday 19 March 2007 17:13:28 Jung-uk Kim wrote: > On Saturday 17 March 2007 09:29 am, Tijl Coosemans wrote: > > On Friday 16 March 2007 12:00:38 Alexander Leidinger wrote: > > > In p4 we have the futex/TLS stuff for amd64 but because of the > > > futexes not completely right part it is not committed to current > > > yet. As we already have the futex and TLS stuff for i386 on a > > > similar level in current, I would say we should go ahead and sync > > > the amd64 stuff. It is not used by default, so we don't break > > > existing linux stuff and we get the benefit of more people being > > > able to have a look at it and play with it. So what are your > > > opinions, shall we give jkim@ the green light to MFp4 the > > > futex/TLS stuff? > > > > You should let an amd64 guru review the tls part in imho. I don't > > think you can remove these lines for instance: (from > > linuxolator-p4.diff) > > > > --- sys/amd64/amd64/cpu_switch.S.orig > > +++ sys/amd64/amd64/cpu_switch.S > > @@ -104,11 +104,12 @@ > > testl $PCB_32BIT,PCB_FLAGS(%r8) > > jz 1f /* no, skip over */ > > > > - /* Save segment selector numbers */ > > - movl %ds,PCB_DS(%r8) > > - movl %es,PCB_ES(%r8) > > - movl %fs,PCB_FS(%r8) > > [...] > > - /* Restore segment selector numbers */ > > - movl PCB_DS(%r8),%ds > > - movl PCB_ES(%r8),%es > > - movl PCB_FS(%r8),%fs > > Actually it was dead code, i.e., PCB_32BIT flag was never set from > anywhere at all. I believe it was part of peter's experiment, which > was never materialized: > > http://docs.freebsd.org/cgi/mid.cgi?200405162243.i4GMhvhh037147 Ah, thanks for clearing this up. So if I understand this correctly, %fs is never preserved right? That's one big cause of trouble for win32 programs then. That log entry mentions to do it ``at user<->kernel transition''; that's where it happens in the i386 kernel. Those 3 segment registers are pushed on the stack there (in exception.s). Could something similar be done on amd64 then?