From owner-freebsd-emulation@FreeBSD.ORG Sun Jul 23 09:18:41 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9F1F16A4DD; Sun, 23 Jul 2006 09:18:41 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBC4643D5F; Sun, 23 Jul 2006 09:18:31 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k6N9IO3o079925 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 23 Jul 2006 11:18:24 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k6N9IOjW079924; Sun, 23 Jul 2006 11:18:24 +0200 (CEST) Date: Sun, 23 Jul 2006 11:18:24 +0200 From: Divacky Roman To: Daniel Eischen Message-ID: <20060723091824.GA79726@stud.fit.vutbr.cz> References: <200607221914.15826.lofi@freebsd.org> <200607222341.05180.lofi@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, kmacy@fsmware.com, Michael Nottebrock Subject: Re: WINE vs. FreeBSD 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, 23 Jul 2006 09:18:41 -0000 On Sat, Jul 22, 2006 at 07:15:35PM -0400, Daniel Eischen wrote: > On Sat, 22 Jul 2006, Michael Nottebrock wrote: > > >On Saturday, 22. July 2006 21:20, Kip Macy wrote: > >>Thanks for your input. > >> > >>The relative merits of the different threading libraries is currently > >>under discussion. Could you also try it with libthr (it may not work > >>at all), I'd like to hear what happens. Thanks. > > > >WINE crashes in roughly the same spot. This is however with a libthr on > >FreeBSD 5.5-RELEASE-p2, which is nothing short of disastrous (with a global > >lib mapping from libpthread to libthr, about 1/3 of all the programs in my > >default KDE session start at all - the rest hangs in state sbwait). > > I think it is because WINE stomps on or TLS. Nothing we can > do about that except patch wine so it doesn't. Look at the > console messages for: > > Warning: pid XXX used static ldt allocation I dont know details but judging from what linux does I think it might be that wine requires more then one GDT entry for TLS areas. at least comment in linux sources suggests so. linux has 3 GDT entries for TLS while fbsd just 1. my 2 cents roman From owner-freebsd-emulation@FreeBSD.ORG Sun Jul 23 16:31:49 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45A5816A4DD; Sun, 23 Jul 2006 16:31:49 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from outmx022.isp.belgacom.be (outmx022.isp.belgacom.be [195.238.4.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1E1543D46; Sun, 23 Jul 2006 16:31:46 +0000 (GMT) (envelope-from tijl@ulyssis.org) Received: from outmx022.isp.belgacom.be (localhost [127.0.0.1]) by outmx022.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k6NGVdLA017684; Sun, 23 Jul 2006 18:31:39 +0200 (envelope-from ) Received: from kalimero.kotnet.org (88.193-245-81.adsl-dyn.isp.belgacom.be [81.245.193.88]) by outmx022.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k6NGVasu017665; Sun, 23 Jul 2006 18:31:36 +0200 (envelope-from ) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.13.6/8.13.6) with ESMTP id k6NGVWKr026231; Sun, 23 Jul 2006 18:31:32 +0200 (CEST) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-hackers@freebsd.org Date: Sun, 23 Jul 2006 18:31:27 +0200 User-Agent: KMail/1.9.3 References: <200607221914.15826.lofi@freebsd.org> <20060723091824.GA79726@stud.fit.vutbr.cz> In-Reply-To: <20060723091824.GA79726@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3152903.kl0IZcXFWA"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200607231831.32410.tijl@ulyssis.org> Cc: Daniel Eischen , kmacy@fsmware.com, freebsd-emulation@freebsd.org, Michael Nottebrock Subject: Re: WINE vs. FreeBSD 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, 23 Jul 2006 16:31:49 -0000 --nextPart3152903.kl0IZcXFWA Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 23 July 2006 11:18, Divacky Roman wrote: > On Sat, Jul 22, 2006 at 07:15:35PM -0400, Daniel Eischen wrote: > > I think it is because WINE stomps on or TLS. =A0Nothing we can > > do about that except patch wine so it doesn't. =A0Look at the > > console messages for: > > > > =A0 Warning: pid XXX used static ldt allocation Wine's LDT code could probably be improved to bring in LDT_AUTO_ALLOC=20 and/or use the GDT entry for %fs through i386_set_fsbase() for TLS=20 instead of allocating an LDT entry (per thread). But, I don't think=20 this is currently a problem. As far as I can see FreeBSD's TLS support=20 doesn't use the LDT (anymore) so wine's static ldt allocation can't=20 possibly interfere with it. > I dont know details but judging from what linux does I think it might > be that wine requires more then one GDT entry for TLS areas. at least > comment in linux sources suggests so. > > linux has 3 GDT entries for TLS while fbsd just 1. Wine on FreeBSD doesn't use the GDT (yet?). It allocates LDT entries for=20 TLS which should work just as well. In any case, FreeBSD and Linux don't differ that much in this. =46reeBSD has 2 GDT entries available, one for %gs which is used by the=20 threading libs (following http://people.redhat.com/drepper/tls.pdf I=20 suppose) and one for %fs which is used by win32 code so wine could use=20 this instead of the LDT way. The related (undocumented) libc functions=20 are i386_get_fsbase, i386_set_fsbase, i386_get_gsbase and=20 i386_set_gsbase. Linux reserves 3 GDT entries, that can be manipulated through one=20 syscall (set_thread_area) and then it's up to the user to point %fs=20 or %gs (or some other selector?) to one of these entries. --nextPart3152903.kl0IZcXFWA Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQBEw6RkdMR2xnarec8RAmiZAKCxPxrOeOEXIDvTORBkVMZuFTTHMACgyNNQ s1337fO7ram0QU52sVBd/XA= =dP1Q -----END PGP SIGNATURE----- --nextPart3152903.kl0IZcXFWA-- From owner-freebsd-emulation@FreeBSD.ORG Sun Jul 23 19:42:27 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9EF616A4DE; Sun, 23 Jul 2006 19:42:27 +0000 (UTC) (envelope-from lofi@freebsd.org) Received: from mail-in-04.arcor-online.net (mail-in-04.arcor-online.net [151.189.21.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9A0243D45; Sun, 23 Jul 2006 19:42:26 +0000 (GMT) (envelope-from lofi@freebsd.org) Received: from mail-in-06-z2.arcor-online.net (mail-in-06-z2.arcor-online.net [151.189.8.18]) by mail-in-04.arcor-online.net (Postfix) with ESMTP id 65BC114AAB9; Sun, 23 Jul 2006 21:42:25 +0200 (CEST) Received: from mail-in-03.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43]) by mail-in-06-z2.arcor-online.net (Postfix) with ESMTP id 56DB61A01DA; Sun, 23 Jul 2006 21:42:25 +0200 (CEST) Received: from lofi.dyndns.org (dslb-084-061-132-214.pools.arcor-ip.net [84.61.132.214]) by mail-in-03.arcor-online.net (Postfix) with ESMTP id 0C7C420F209; Sun, 23 Jul 2006 21:42:25 +0200 (CEST) Received: from kiste.my.domain (kiste.my.domain [192.168.8.4]) by lofi.dyndns.org (8.13.4/8.13.3) with ESMTP id k6NJgJ4j055372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 23 Jul 2006 21:42:20 +0200 (CEST) (envelope-from lofi@freebsd.org) Received: from kiste.my.domain (localhost [127.0.0.1]) by kiste.my.domain (8.13.6/8.13.4) with ESMTP id k6NJgIa9036691; Sun, 23 Jul 2006 21:42:18 +0200 (CEST) (envelope-from lofi@freebsd.org) Received: by kiste.my.domain (8.13.6/8.13.4/Submit) id k6NJgG3Z036690; Sun, 23 Jul 2006 21:42:16 +0200 (CEST) (envelope-from lofi@freebsd.org) X-Authentication-Warning: kiste.my.domain: lofi set sender to lofi@freebsd.org using -f From: Michael Nottebrock To: kmacy@fsmware.com Date: Sun, 23 Jul 2006 21:42:12 +0200 User-Agent: KMail/1.9.3 References: <200607221914.15826.lofi@freebsd.org> <200607222341.05180.lofi@freebsd.org> In-Reply-To: X-Face: =Ym$`&q\+S2X$4`X%x%6"L4>Y,$]<":'L%c9"#7#`2tb&E&wsN31on!N\)3BD[g<=?utf-8?q?=2EjnfV=5B=0A=093=23?=>XchLK,o; >bD>c:]^; :>0>vyZ.X[,63GW`&M>}nYnr]-Fp``,[[@lJ!QL|sfW!s)=?utf-8?q?A2!*=0A=09vNkB/=7CL-?=>&QdSbQg X-Virus-Scanned: by amavisd-new Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org Subject: Re: WINE vs. FreeBSD 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, 23 Jul 2006 19:42:27 -0000 --nextPart6206001.iiAGvT54bV Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday, 23. July 2006 00:59, Kip Macy wrote: > Thanks. That is a useful data point but David Xu has done a lot of > work on libthr that has probably not been MFC'd back to 5.x. When I > get the chance I'll try building KDE on my desktop which runs a > derivative of -CURRENT. At least on FreeBSD 5, the problems with libthr aren't just limited to KDE= =20 (which really doesn't use threads all that much - Qt has limited support fo= r=20 threads, KDE has even less and actual multithreaded KDE programs are few an= d=20 far between) - running the base-system BIND as a local DNS cache for more=20 than an hour or so with a global mapping from libpthread to libthr active i= s=20 usually enough to expose the problem (i.e. name resolution will stop=20 working). =2D-=20 ,_, | Michael Nottebrock | lofi@freebsd.org (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org --nextPart6206001.iiAGvT54bV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQBEw9EYXhc68WspdLARAtdoAJ9XaPWldgcf6PLcEBijXom1ftg1sACgp5KD uTRrUlTSPlNa6xYRM/nlo7s= =5VrI -----END PGP SIGNATURE----- --nextPart6206001.iiAGvT54bV-- From owner-freebsd-emulation@FreeBSD.ORG Sun Jul 23 19:43:41 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1A7D16A4E5; Sun, 23 Jul 2006 19:43:41 +0000 (UTC) (envelope-from lofi@freebsd.org) Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9307543D60; Sun, 23 Jul 2006 19:43:31 +0000 (GMT) (envelope-from lofi@freebsd.org) Received: from mail-in-06-z2.arcor-online.net (mail-in-06-z2.arcor-online.net [151.189.8.18]) by mail-in-05.arcor-online.net (Postfix) with ESMTP id 312E81849A5; Sun, 23 Jul 2006 21:43:30 +0200 (CEST) Received: from mail-in-03.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43]) by mail-in-06-z2.arcor-online.net (Postfix) with ESMTP id 1DB801A01D6; Sun, 23 Jul 2006 21:43:30 +0200 (CEST) Received: from lofi.dyndns.org (dslb-084-061-132-214.pools.arcor-ip.net [84.61.132.214]) by mail-in-03.arcor-online.net (Postfix) with ESMTP id 8A05220F07D; Sun, 23 Jul 2006 21:43:29 +0200 (CEST) Received: from kiste.my.domain (kiste.my.domain [192.168.8.4]) by lofi.dyndns.org (8.13.4/8.13.3) with ESMTP id k6NJhPWR055382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 23 Jul 2006 21:43:25 +0200 (CEST) (envelope-from lofi@freebsd.org) Received: from kiste.my.domain (localhost [127.0.0.1]) by kiste.my.domain (8.13.6/8.13.4) with ESMTP id k6NJhO92036730; Sun, 23 Jul 2006 21:43:24 +0200 (CEST) (envelope-from lofi@freebsd.org) Received: from localhost (localhost [[UNIX: localhost]]) by kiste.my.domain (8.13.6/8.13.4/Submit) id k6NJhOpu036729; Sun, 23 Jul 2006 21:43:24 +0200 (CEST) (envelope-from lofi@freebsd.org) X-Authentication-Warning: kiste.my.domain: lofi set sender to lofi@freebsd.org using -f From: Michael Nottebrock To: Daniel Eischen Date: Sun, 23 Jul 2006 21:43:23 +0200 User-Agent: KMail/1.9.3 References: <200607221914.15826.lofi@freebsd.org> <200607222341.05180.lofi@freebsd.org> In-Reply-To: X-Face: =Ym$`&q\+S2X$4`X%x%6"L4>Y,$]<":'L%c9"#7#`2tb&E&wsN31on!N\)3BD[g<=?utf-8?q?=2EjnfV=5B=0A=093=23?=>XchLK,o; >bD>c:]^; :>0>vyZ.X[,63GW`&M>}nYnr]-Fp``,[[@lJ!QL|sfW!s)=?utf-8?q?A2!*=0A=09vNkB/=7CL-?=>&QdSbQg X-Virus-Scanned: by amavisd-new Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, kmacy@fsmware.com Subject: Re: WINE vs. FreeBSD 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, 23 Jul 2006 19:43:41 -0000 --nextPart4651305.pPGyhYvrFj Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday, 23. July 2006 01:15, Daniel Eischen wrote: > On Sat, 22 Jul 2006, Michael Nottebrock wrote: > > On Saturday, 22. July 2006 21:20, Kip Macy wrote: > I think it is because WINE stomps on or TLS. Nothing we can > do about that except patch wine so it doesn't. Look at the > console messages for: > > Warning: pid XXX used static ldt allocation Yes, it does indeed trigger those - lots of them. =2D-=20 ,_, | Michael Nottebrock | lofi@freebsd.org (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org --nextPart4651305.pPGyhYvrFj Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQBEw9FcXhc68WspdLARAq7FAJ9T6Bc+eHOn4yrXInWOCqEQnKbnsQCgq1P1 dF7zDKInR3HHwFUzITWQzzU= =DFI2 -----END PGP SIGNATURE----- --nextPart4651305.pPGyhYvrFj-- From owner-freebsd-emulation@FreeBSD.ORG Sun Jul 23 21:08:55 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F4DB16A4DD; Sun, 23 Jul 2006 21:08:55 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id F166543D46; Sun, 23 Jul 2006 21:08:54 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.7/8.13.7/NETPLEX) with ESMTP id k6NL8rM4016092; Sun, 23 Jul 2006 17:08:53 -0400 (EDT) Date: Sun, 23 Jul 2006 17:08:53 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Michael Nottebrock In-Reply-To: <200607232143.24374.lofi@freebsd.org> Message-ID: References: <200607221914.15826.lofi@freebsd.org> <200607222341.05180.lofi@freebsd.org> <200607232143.24374.lofi@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, kmacy@fsmware.com Subject: Re: WINE vs. FreeBSD X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jul 2006 21:08:55 -0000 On Sun, 23 Jul 2006, Michael Nottebrock wrote: > On Sunday, 23. July 2006 01:15, Daniel Eischen wrote: >> On Sat, 22 Jul 2006, Michael Nottebrock wrote: >>> On Saturday, 22. July 2006 21:20, Kip Macy wrote: > >> I think it is because WINE stomps on or TLS. Nothing we can >> do about that except patch wine so it doesn't. Look at the >> console messages for: >> >> Warning: pid XXX used static ldt allocation > > Yes, it does indeed trigger those - lots of them. This is a problem with the way WINE is built or something. It is not a threads problem. Please close the PR. Thanks, -- DE From owner-freebsd-emulation@FreeBSD.ORG Sun Jul 23 22:43:26 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C109116A4DA; Sun, 23 Jul 2006 22:43:26 +0000 (UTC) (envelope-from qemu-l@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5EF943D45; Sun, 23 Jul 2006 22:43:25 +0000 (GMT) (envelope-from qemu-l@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn [127.0.0.1]) by gwyn.kn-bremen.de (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k6NMhM9a012123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 24 Jul 2006 00:43:22 +0200 Received: from saturn.kn-bremen.de (uucp@localhost) by gwyn.kn-bremen.de (8.13.4/8.13.4/Submit) with UUCP id k6NMhMFQ012121; Mon, 24 Jul 2006 00:43:22 +0200 Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.6/8.13.6) with ESMTP id k6NMeh2c020372; Mon, 24 Jul 2006 00:40:43 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.6/8.13.6/Submit) id k6NMegnL020371; Mon, 24 Jul 2006 00:40:42 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Mon, 24 Jul 2006 00:40:41 +0200 To: freebsd-emulation@freebsd.org, freebsd-usb@freebsd.org, qemu-devel@nongnu.org Message-ID: <20060723224041.GA20196@saturn.kn-bremen.de> Mail-Followup-To: freebsd-emulation@freebsd.org, freebsd-usb@freebsd.org, qemu-devel@nongnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11 Cc: Subject: qemu 0.8.2 update - please test! (and usb cardreader SET_ADDR_FAILED) 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, 23 Jul 2006 22:43:27 -0000 With the help of Lonnie Mendez (he updated his usb host support patch) I just put together an experimental qemu port update. For some reason my usb cardreader didnt want to work today: uhub1: device problem (SET_ADDR_FAILED), disabling port 1 (anyone have an idea about this one? this is the first time i tried using it since I updated this box to 6.1), so the usb host support is untested. To test usb best run qemu with -monitor stdio, then do `info usbhost' when its running and then `usb_add host:' where x.y is the host device you want to add (`plug into' the guest). also see the port's pkg-message. enjoy, Juergen Removed files: files/patch-malc-17h_aqemu files/patch-sdl.c files/patch-vl.c Index: Makefile =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/Makefile,v retrieving revision 1.53 diff -u -r1.53 Makefile --- Makefile 23 Jul 2006 00:04:01 -0000 1.53 +++ Makefile 23 Jul 2006 15:51:45 -0000 @@ -6,8 +6,7 @@ # PORTNAME= qemu -PORTVERSION= 0.8.1 -PORTREVISION= 2 +PORTVERSION= 0.8.2 CATEGORIES= emulators MASTER_SITES= http://www.qemu.org/:release \ http://people.fruitsalad.org/nox/qemu/:snapshot \ Index: distinfo =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/distinfo,v retrieving revision 1.31 diff -u -r1.31 distinfo --- distinfo 6 May 2006 16:15:41 -0000 1.31 +++ distinfo 23 Jul 2006 15:52:26 -0000 @@ -1,6 +1,6 @@ -MD5 (qemu/qemu-0.8.1.tar.gz) = 67d924324a5ab79d017bd97a1e767285 -SHA256 (qemu/qemu-0.8.1.tar.gz) = a1f83666f5c05eaee9bfc608a3a5034ad95d0fd3c99937bb399bf9235a6aa0c9 -SIZE (qemu/qemu-0.8.1.tar.gz) = 1623264 +MD5 (qemu/qemu-0.8.2.tar.gz) = 5b3a89eb2f256a8a6f3bb07f7b3f1b07 +SHA256 (qemu/qemu-0.8.2.tar.gz) = 2a20d811296c859d678bdd002222aa7ca7951a641327234f3af144e822d078f3 +SIZE (qemu/qemu-0.8.2.tar.gz) = 1810909 MD5 (qemu/patch3_cirrus) = ebe7ed9fce804c49e024bc93bfdfc810 SHA256 (qemu/patch3_cirrus) = e862371834b7d895a896fbdb84fd9f70d17b5729a6f6789a48a61504fc941e11 SIZE (qemu/patch3_cirrus) = 8817 Index: pkg-descr =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/pkg-descr,v retrieving revision 1.3 diff -u -r1.3 pkg-descr --- pkg-descr 19 Jul 2005 06:06:56 -0000 1.3 +++ pkg-descr 23 Jul 2006 17:46:11 -0000 @@ -12,9 +12,9 @@ cross-debugging. As QEMU requires no host kernel patches to run, it is very safe and easy to use. -(but kqemu is now also supported for the i386 on i386 case) +(but kqemu is now also supported for the i386 on i386 and amd64 case) See also the preconfigured system images on http://oszoo.org/ Many live cd isos also work. -WWW: http://fabrice.bellard.free.fr/qemu/ +WWW: http://qemu.org/ Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/pkg-plist,v retrieving revision 1.15 diff -u -r1.15 pkg-plist --- pkg-plist 19 May 2006 08:17:54 -0000 1.15 +++ pkg-plist 23 Jul 2006 17:41:29 -0000 @@ -13,7 +13,7 @@ %%DATADIR%%/vgabios.bin %%DATADIR%%/vgabios-cirrus.bin %%DATADIR%%/ppc_rom.bin -%%DATADIR%%/proll.elf +%%DATADIR%%/openbios-sparc32 %%DATADIR%%/video.x %%DATADIR%%/keymaps/ar %%DATADIR%%/keymaps/common Index: files/patch-be =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/files/patch-be,v retrieving revision 1.2 diff -u -r1.2 patch-be --- files/patch-be 1 May 2005 07:39:11 -0000 1.2 +++ files/patch-be 23 Jul 2006 16:30:16 -0000 @@ -1,16 +1,12 @@ -Index: qemu/vl.c -@@ -662,6 +662,14 @@ - case QEMU_TIMER_REALTIME: - #ifdef _WIN32 - return GetTickCount(); -+#elif defined(_BSD) -+ { -+ struct timeval r; -+ if (!gettimeofday(&r, NULL)) { -+ return ((timer_freq * 1000LL) * (int64_t)r.tv_sec -+ + ((int64_t)r.tv_usec * timer_freq) / 1000) / timer_freq; -+ } -+ } - #else - { - struct tms tp; +Index: qemu/Makefile.target +@@ -404,7 +404,9 @@ + ifndef CONFIG_DARWIN + ifndef CONFIG_WIN32 + ifndef CONFIG_SOLARIS +-VL_LIBS=-lutil -lrt ++#VL_LIBS=-lutil -lrt ++# XXX this cant be just merged back... ++VL_LIBS=-lutil + endif + endif + endif Index: files/patch-bsdusb.patch =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/files/patch-bsdusb.patch,v retrieving revision 1.4 diff -u -r1.4 patch-bsdusb.patch --- files/patch-bsdusb.patch 29 Apr 2006 09:15:50 -0000 1.4 +++ files/patch-bsdusb.patch 23 Jul 2006 19:58:22 -0000 @@ -1,6 +1,5 @@ Index: qemu/configure -@@ -122,7 +122,8 @@ - *) +@@ -134,6 +134,7 @@ oss="yes" linux="yes" user="yes" @@ -8,18 +7,19 @@ if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then kqemu="yes" fi -@@ -131,6 +132,7 @@ +@@ -143,6 +144,7 @@ if [ "$bsd" = "yes" ] ; then - if [ ! "$darwin" = "yes" ] ; then + if [ "$darwin" != "yes" ] ; then make="gmake" + usb="bsd" fi fi -@@ -656,6 +675,19 @@ - echo "#define _BSD 1" >> $config_h +@@ -724,6 +726,19 @@ fi + echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h ++ +# USB host support +case "$usb" in +linux) @@ -32,20 +32,19 @@ + echo "HOST_USB=stub" >> $config_mak +;; +esac -+ - for target in $target_list; do + for target in $target_list; do target_dir="$target" Index: qemu/Makefile.target -@@ -303,7 +303,7 @@ - endif +@@ -329,7 +329,7 @@ + VL_OBJS+= scsi-disk.o cdrom.o lsi53c895a.o # USB layer --VL_OBJS+= usb.o usb-hub.o usb-uhci.o usb-linux.o usb-hid.o -+VL_OBJS+= usb.o usb-hub.o usb-uhci.o usb-$(HOST_USB).o usb-hid.o +-VL_OBJS+= usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o ++VL_OBJS+= usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-ohci.o usb-msd.o # PCI network cards - VL_OBJS+= ne2000.o rtl8139.o + VL_OBJS+= ne2000.o rtl8139.o pcnet.o Index: qemu/usb-stub.c @@ -0,0 +1,11 @@ +#include "vl.h" @@ -60,11 +59,11 @@ + return NULL; +} Index: qemu/usb-bsd.c -@@ -0,0 +1,592 @@ +@@ -0,0 +1,603 @@ +/* + * BSD host USB redirector + * -+ * Copyright (c) 2005 Lonnie Mendez ++ * Copyright (c) 2006 Lonnie Mendez + * Portions of code and concepts borrowed from + * usb-linux.c and libusb's bsd.c and are copyright their respective owners. + * @@ -336,6 +335,23 @@ + } +} + ++static void usb_host_handle_destroy(USBDevice *opaque) ++{ ++ USBHostDevice *s = (USBHostDevice *)opaque; ++ int i; ++ ++ for (i = 0; i < USB_MAX_ENDPOINTS; i++) ++ if (s->ep_fd[i] >= 0) ++ close(s->ep_fd[i]); ++ ++ if (s->devfd < 0) ++ return; ++ ++ close(s->devfd); ++ ++ qemu_free(s); ++} ++ +USBDevice *usb_host_device_open(const char *devname) +{ + struct usb_device_info bus_info, dev_info; @@ -409,8 +425,16 @@ + dev->dev.handle_reset = usb_host_handle_reset; + dev->dev.handle_control = usb_host_handle_control; + dev->dev.handle_data = usb_host_handle_data; ++ dev->dev.handle_destroy = usb_host_handle_destroy; ++ ++ if (strncmp(dev_info.udi_product, "product", 7) != 0) ++ pstrcpy(dev->dev.devname, sizeof(dev->dev.devname), ++ dev_info.udi_product); ++ else ++ snprintf(dev->dev.devname, sizeof(dev->dev.devname), ++ "host:%s", devname); + -+ strcpy(dev->devpath, "/dev/"); ++ pstrcpy(dev->devpath, sizeof(dev->devpath), "/dev/"); + strcat(dev->devpath, dev_info.udi_devnames[0]); + + /* Mark the endpoints as not yet open */ @@ -426,21 +450,6 @@ + return NULL; +} + -+void usb_host_device_close(USBDevice *opaque) -+{ -+ USBHostDevice *s = (USBHostDevice *)opaque; -+ int i; -+ -+ for (i = 0; i < USB_MAX_ENDPOINTS; i++) -+ if (s->ep_fd[i] >= 0) -+ close(s->ep_fd[i]); -+ -+ if (s->devfd < 0) -+ return; -+ -+ close(s->devfd); -+} -+ +static int usb_host_scan(void *opaque, USBScanFunc *func) +{ + struct usb_device_info bus_info; @@ -494,7 +503,8 @@ + speed = dev_info.udi_speed; + + if (strncmp(dev_info.udi_product, "product", 7) != 0) -+ strcpy(product_name, dev_info.udi_product); ++ pstrcpy(product_name, sizeof(product_name), ++ dev_info.udi_product); + else + product_name[0] = '\0'; + @@ -653,55 +663,6 @@ +{ + usb_host_scan(NULL, usb_host_info_device); +} -Index: qemu/vl.c -@@ -3245,14 +3258,17 @@ - dev = usb_host_device_open(p); - if (!dev) - return -1; -+ dev->isproxied = 1; - } else if (!strcmp(devname, "mouse")) { - dev = usb_mouse_init(); - if (!dev) - return -1; -+ dev->isproxied = 0; - } else if (!strcmp(devname, "tablet")) { - dev = usb_tablet_init(); - if (!dev) - return -1; -+ dev->isproxied = 0; - } else { - return -1; - } -@@ -3281,6 +3297,8 @@ - if (dev && dev->addr == addr) - break; - } -+ if (dev && dev->isproxied) -+ usb_host_device_close(dev); - if (i == MAX_VM_USB_PORTS) - return -1; - usb_attach(vm_usb_ports[i], NULL); -Index: qemu/hw/usb.h -@@ -135,6 +146,8 @@ - int setup_state; - int setup_len; - int setup_index; -+ -+ int isproxied; - }; - - /* USB port on which a device can be connected */ -@@ -157,8 +170,9 @@ - /* usb-uhci.c */ - void usb_uhci_init(PCIBus *bus, USBPort **usb_ports); - --/* usb-linux.c */ -+/* host proxy functions */ - USBDevice *usb_host_device_open(const char *devname); -+void usb_host_device_close(USBDevice *dev); - void usb_host_info(void); - - /* usb-hid.c */ Index: qemu/usb-linux.c @@ -23,7 +23,6 @@ */ @@ -710,23 +671,8 @@ -#if defined(__linux__) #include #include - #include -@@ -255,6 +254,14 @@ - return q - buf; - } - -+void usb_host_device_close(USBDevice *opaque) -+{ -+ USBHostDevice *s = (USBHostDevice *)opaque; -+ -+ if (s->fd >= 0) -+ close(s->fd); -+} -+ - static int usb_host_scan(void *opaque, USBScanFunc *func) - { - FILE *f; -@@ -468,18 +475,3 @@ + #include +@@ -505,18 +504,3 @@ { usb_host_scan(NULL, usb_host_info_device); } Index: files/patch-fbsd =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/files/patch-fbsd,v retrieving revision 1.7 diff -u -r1.7 patch-fbsd --- files/patch-fbsd 6 May 2006 16:15:41 -0000 1.7 +++ files/patch-fbsd 23 Jul 2006 16:15:26 -0000 @@ -1,21 +1,17 @@ Index: qemu/Makefile -@@ -13,11 +13,14 @@ +@@ -25,7 +25,10 @@ + DOCS= endif - DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 - --all: dyngen$(EXESUF) $(TOOLS) $(DOCS) -+all: bsd/libmath.a dyngen$(EXESUF) $(TOOLS) $(DOCS) - for d in $(TARGET_DIRS); do \ - $(MAKE) -C $$d $@ || exit 1 ; \ - done +-all: $(TOOLS) $(DOCS) recurse-all ++all: bsd/libmath.a $(TOOLS) $(DOCS) recurse-all ++ +bsd/libmath.a: + ( cd bsd ; $(BSD_MAKE) CC=$(CC) ) -+ - qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c - $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) -@@ -26,6 +29,7 @@ + subdir-%: dyngen$(EXESUF) + $(MAKE) -C $(subst subdir-,,$@) all +@@ -40,6 +43,7 @@ clean: # avoid old build problems by removing potentially incorrect old files @@ -36,7 +32,7 @@ cocoa.o: cocoa.m $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< Index: qemu/fpu/softfloat-native.c -@@ -2,11 +2,15 @@ +@@ -2,11 +2,14 @@ context is supported */ #include "softfloat.h" #include @@ -47,21 +43,20 @@ void set_float_rounding_mode(int val STATUS_PARAM) { STATUS(float_rounding_mode) = val; --#if defined(_BSD) && !defined(__APPLE__) -+#if defined(_BSD) && !defined(__APPLE__) && \ -+ (defined(__FreeBSD__) && __FreeBSD_version < 500000) +-#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) ++#if (defined(_BSD) && (defined(__FreeBSD__) && __FreeBSD_version < 500000)) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) fpsetround(val); #elif defined(__arm__) /* nothing to do */ -@@ -22,7 +26,7 @@ +@@ -22,7 +25,7 @@ } #endif --#if defined(_BSD) -+#if defined(_BSD) && !defined(__FreeBSD__) - #define lrint(d) ((long)rint(d)) - #define llrint(d) ((long long)rint(d)) - #endif +-#if defined(_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) ++#if (defined(_BSD) && !defined(__FreeBSD__)) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) + #define lrint(d) ((int32_t)rint(d)) + #define llrint(d) ((int64_t)rint(d)) + #define lrintf(f) ((int32_t)rint(f)) Index: qemu/fpu/softfloat-native.h @@ -1,8 +1,28 @@ /* Native implementation of soft float functions */ From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 24 10:20:20 2006 Return-Path: X-Original-To: freebsd-emulation@hub.freebsd.org Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11D7716A4E1 for ; Mon, 24 Jul 2006 10:20:20 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF33643D49 for ; Mon, 24 Jul 2006 10:20:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k6OAKJ7a008115 for ; Mon, 24 Jul 2006 10:20:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k6OAKJif008114; Mon, 24 Jul 2006 10:20:19 GMT (envelope-from gnats) Date: Mon, 24 Jul 2006 10:20:19 GMT Message-Id: <200607241020.k6OAKJif008114@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: Detlef Sax Cc: Subject: Re: ports/100714: /u/p/graphics/linux_dri broken X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Detlef Sax List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2006 10:20:20 -0000 The following reply was made to PR ports/100714; it has been noted by GNATS. From: Detlef Sax To: bug-followup@FreeBSD.org, sax@noart.de Cc: Subject: Re: ports/100714: /u/p/graphics/linux_dri broken Date: Mon, 24 Jul 2006 12:15:02 +0200 Got a response in Usenet. To extract these tarballs on a 4.x FreeBSD it's neccessary to edit /usr/ports/Mk/bsd.port.mk and change the TAR varibable to /usr/local/bin/bsdtar. Which must of course be present in the system. Thanks to Usenet again. D. Sax From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 24 11:03:18 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F294216A503 for ; Mon, 24 Jul 2006 11:03:18 +0000 (UTC) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57F6143DB0 for ; Mon, 24 Jul 2006 11:02:41 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k6OB2ZtR013593 for ; Mon, 24 Jul 2006 11:02:35 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k6OB2Yc7013589 for freebsd-emulation@freebsd.org; Mon, 24 Jul 2006 11:02:34 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 24 Jul 2006 11:02:34 GMT Message-Id: <200607241102.k6OB2Yc7013589@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-emulation@FreeBSD.org Cc: Subject: Current problem reports assigned to you 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, 24 Jul 2006 11:03:19 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/09/22] kern/21463 emulation [linux] Linux compatability mode should n f [2002/11/07] kern/45023 emulation [linux] [patch] flexlm does not run with o [2005/02/19] kern/77710 emulation [linux] Linux page fault sigcontext infor 3 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [1999/04/16] kern/11165 emulation [ibcs2] IBCS2 doesn't work correctly with o [2001/08/14] kern/29698 emulation [linux] [patch] linux ipcs doesn'work o [2002/06/12] kern/39201 emulation [linux] [patch] ptrace(2) and rfork(RFLIN o [2002/08/11] kern/41543 emulation [patch] feature request: easier wine/w23 o [2003/08/21] kern/55835 emulation [linux] [patch] Linux IPC emulation missi a [2004/10/20] kern/72920 emulation [linux]: path "prefixing" is not done on o [2004/11/10] kern/73777 emulation [linux] [patch] linux emulation: root dir o [2006/01/04] kern/91293 emulation [svr4] [patch] *Experimental* Update to t o [2006/07/22] ports/100714emulation /u/p/graphics/linux_dri broken 9 problems total. From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 24 15:06:21 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1DCC16A4DD; Mon, 24 Jul 2006 15:06:20 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from outmx013.isp.belgacom.be (outmx013.isp.belgacom.be [195.238.5.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F5EC43D49; Mon, 24 Jul 2006 15:06:17 +0000 (GMT) (envelope-from tijl@ulyssis.org) Received: from outmx013.isp.belgacom.be (localhost [127.0.0.1]) by outmx013.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k6OF6EM9027430; Mon, 24 Jul 2006 17:06:15 +0200 (envelope-from ) Received: from kalimero.kotnet.org (88.193-245-81.adsl-dyn.isp.belgacom.be [81.245.193.88]) by outmx013.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k6OF6CZG027402; Mon, 24 Jul 2006 17:06:12 +0200 (envelope-from ) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.13.6/8.13.6) with ESMTP id k6OF684T047356; Mon, 24 Jul 2006 17:06:09 +0200 (CEST) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-hackers@freebsd.org Date: Mon, 24 Jul 2006 17:06:01 +0200 User-Agent: KMail/1.9.3 References: <200607221914.15826.lofi@freebsd.org> In-Reply-To: <200607221914.15826.lofi@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5011153.KMGMiH3a1f"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200607241706.08396.tijl@ulyssis.org> Cc: freebsd-emulation@freebsd.org, Michael Nottebrock Subject: Re: WINE vs. FreeBSD 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, 24 Jul 2006 15:06:21 -0000 --nextPart5011153.KMGMiH3a1f Content-Type: multipart/mixed; boundary="Boundary-01=_aHOxEESzu2uIOd8" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_aHOxEESzu2uIOd8 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 22 July 2006 19:14, Michael Nottebrock wrote: > WINE does have certain requirements regarding memory allocation. In > particular it (or Windows, rather) really wants a few memory ranges > for itself: > > (from wine-0.9.17/loader/preloader.c): > > * 0x00000000 - 0x00110000 the DOS area > * 0x80000000 - 0x81000000 the shared heap > * ??? - ??? the PE binary load address (usually > starting at 0x00400000) > > The first two are particularly important for WINE running in win98 > (or earlier) emulation mode, which is currently completely broken on > FreeBSD, since those two memory ranges tend to be unavailable. The reason for the second range is that wine is located way at the end=20 of the 2G range (0x7bf00000). FreeBSD's mmap preserves heap space after=20 that (for brk(2) style allocations). This is about 512Mb by default so=20 everything in 0x7bf00000-0x9bf00000 is unavailable (unless MAP_FIXED is=20 used of course). The DOS area should be available but can't be allocated by wine because=20 of a FreeBSD specific quirk in its code to work arround another mmap=20 related problem. Both problems can be solved by locating wine at say 0x20000000 instead=20 of 0x7bf00000. That leaves plenty of space for the windows executable=20 and allows us to remove mmap related freebsd quirks from wine's code. I've attached two patches that accomplish this, but this seems to=20 trigger other problems, so use at your own risk. If you want to try=20 them, place them in the port's files/ directory and add a line=20 containing "USE_AUTOTOOLS=3D autoconf:259" to the Makefile. This seems to=20 break wine+libpthread, so I've also changed the port to use libthr=20 instead. =46or the libpthread experts, I haven't investigated that much further=20 yet, but libpthread seems to fail in create_stack() from=20 _pthread_create() from _thr_start_sig_daemon(). > The preloader bit from which this is quoted is WINE's "own shared > object loader that reserves memory that is important to Wine, and > then loads the main binary and its ELF interpreter", and obviously > does not work right on FreeBSD. I'm not sure whether it can be made > to or not, perhaps somebody familiar with both our VM and runtime > linker could take a look. The preloader isn't used on FreeBSD. You either run wine-kthread or=20 wine(-pthread) directly. The reason for the preloader in linux is=20 mainly exec-shield which makes the mapping of DSOs unpredictable. > http://bugs.winehq.org/show_bug.cgi?id=3D5732 Do the above mentioned patches solve your second issue here (PE exec=20 location)? > The other big issue with WINE on FreeBSD seems to be our threading > support. WINE quite reliably manages to confuse libpthread, see > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dthreads/100701. On SMP > machines, I've even been able to trigger kernel panics with WINE (in > win2k+ emulation mode) by merely hitting the close button on a > windows application (and WINE subsequently shutting down): >=20 http://lists.freebsd.org/pipermail/freebsd-stable/2006-June/026219.html.=20 > > WINE's threads interface can be found in loader/pthread.c and > loader/kthread.c - again, it would be great, if someone to whom that > sort of code means more than just random gibberish could take a look. Wine does some freaky stack manipulations. I think that may interfere=20 with the way our threading libs handle the stack (allocation etc.). But=20 I am just guessing here really. --Boundary-01=_aHOxEESzu2uIOd8 Content-Type: text/plain; charset="iso-8859-15"; name="patch-configure.ac" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patch-configure.ac" =2D-- configure.ac.orig Mon Jul 10 18:01:07 2006 +++ configure.ac Mon Jul 24 15:42:41 2006 @@ -149,7 +149,7 @@ dnl Check for -lresolv for Mac OS X/Darwin AC_CHECK_LIB(resolv,res_9_init) dnl Check for -lpthread =2DAC_CHECK_LIB(pthread,pthread_create,AC_SUBST(LIBPTHREAD,"-lpthread")) +AC_CHECK_LIB(thr,pthread_create,AC_SUBST(LIBPTHREAD,"-lthr")) =20 AC_SUBST(XLIB,"") AC_SUBST(XFILES,"") @@ -1116,18 +1116,18 @@ ac_cv_ld_rpath=3D"yes",ac_cv_ld_rpath=3D"no")]) if test "$ac_cv_ld_rpath" =3D "yes" then =2D AC_SUBST(LDEXERPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \= $(bindir) \$(libdir)\`"]) =2D AC_SUBST(LDDLLRPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \= $(dlldir) \$(libdir)\`"]) + AC_SUBST(LDEXERPATH,["-Wl,--rpath,${libdir}"]) + AC_SUBST(LDDLLRPATH,["-Wl,--rpath,${libdir}"]) fi =20 case $host_cpu in *i[[3456789]]86* | x86_64) =2D AC_CACHE_CHECK([whether we can relocate the executable to 0x= 7bf00000], ac_cv_ld_reloc_exec, =2D [WINE_TRY_CFLAGS([-Wl,--section-start,.interp=3D0x7bf00400= ], + AC_CACHE_CHECK([whether we can relocate the executable to 0x20= 000000], ac_cv_ld_reloc_exec, + [WINE_TRY_CFLAGS([-Wl,--section-start,.interp=3D0x20000400], ac_cv_ld_reloc_exec=3D"yes", ac_cv_ld_reloc= _exec=3D"no")]) if test "$ac_cv_ld_reloc_exec" =3D "yes" then =2D LDEXECFLAGS=3D"$LDEXECFLAGS -Wl,--section-start,.interp=3D= 0x7bf00400" + LDEXECFLAGS=3D"$LDEXECFLAGS -Wl,--section-start,.interp=3D0x= 20000400" fi ;; esac --Boundary-01=_aHOxEESzu2uIOd8 Content-Type: text/plain; charset="iso-8859-15"; name="patch-libs-wine-mmap.c" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patch-libs-wine-mmap.c" =2D-- libs/wine/mmap.c.orig Mon Jul 24 11:12:42 2006 +++ libs/wine/mmap.c Mon Jul 24 11:13:39 2006 @@ -200,11 +200,6 @@ =20 if (!(flags & MAP_FIXED)) { =2D#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) =2D /* Even FreeBSD 5.3 does not properly support NULL here. */ =2D if( start =3D=3D NULL ) start =3D (void *)0x110000; =2D#endif =2D #ifdef MAP_TRYFIXED /* If available, this will attempt a fixed mapping in-kernel */ flags |=3D MAP_TRYFIXED; @@ -318,7 +313,7 @@ { struct reserved_area *area; struct list *ptr; =2D#if defined(__i386__) && !defined(__FreeBSD__) && !defined(__FreeBSD_ker= nel__) /* commented out until FreeBSD gets fixed */ +#if defined(__i386__) char stack; char * const stack_ptr =3D &stack; char *user_space_limit =3D (char *)0x7ffe0000; --Boundary-01=_aHOxEESzu2uIOd8-- --nextPart5011153.KMGMiH3a1f Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQBExOHgdMR2xnarec8RAmaXAKCMOnNwdauewwJkZeVFnJGb7C+gcwCgx/7Y zrPmcSy7QfdMB6TliKSi61k= =hLF8 -----END PGP SIGNATURE----- --nextPart5011153.KMGMiH3a1f-- From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 24 15:39:26 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD38B16A4DE; Mon, 24 Jul 2006 15:39:26 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 279DB43D45; Mon, 24 Jul 2006 15:39:26 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.7/8.13.7/NETPLEX) with ESMTP id k6OFdO41026474; Mon, 24 Jul 2006 11:39:25 -0400 (EDT) Date: Mon, 24 Jul 2006 11:39:24 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Tijl Coosemans In-Reply-To: <200607241706.08396.tijl@ulyssis.org> Message-ID: References: <200607221914.15826.lofi@freebsd.org> <200607241706.08396.tijl@ulyssis.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Content-ID: Content-Disposition: inline X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, Michael Nottebrock Subject: Re: WINE vs. FreeBSD X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2006 15:39:26 -0000 On Mon, 24 Jul 2006, Tijl Coosemans wrote: > On Saturday 22 July 2006 19:14, Michael Nottebrock wrote: >> WINE does have certain requirements regarding memory allocation. In >> particular it (or Windows, rather) really wants a few memory ranges >> for itself: >> >> (from wine-0.9.17/loader/preloader.c): >> >> * 0x00000000 - 0x00110000 the DOS area >> * 0x80000000 - 0x81000000 the shared heap >> * ??? - ??? the PE binary load address (usually >> starting at 0x00400000) >> >> The first two are particularly important for WINE running in win98 >> (or earlier) emulation mode, which is currently completely broken on >> FreeBSD, since those two memory ranges tend to be unavailable. > > The reason for the second range is that wine is located way at the end > of the 2G range (0x7bf00000). FreeBSD's mmap preserves heap space after > that (for brk(2) style allocations). This is about 512Mb by default so > everything in 0x7bf00000-0x9bf00000 is unavailable (unless MAP_FIXED is > used of course). > > The DOS area should be available but can't be allocated by wine because > of a FreeBSD specific quirk in its code to work arround another mmap > related problem. > > Both problems can be solved by locating wine at say 0x20000000 instead > of 0x7bf00000. That leaves plenty of space for the windows executable > and allows us to remove mmap related freebsd quirks from wine's code. > > I've attached two patches that accomplish this, but this seems to > trigger other problems, so use at your own risk. If you want to try > them, place them in the port's files/ directory and add a line > containing "USE_AUTOTOOLS= autoconf:259" to the Makefile. This seems to > break wine+libpthread, so I've also changed the port to use libthr > instead. > > For the libpthread experts, I haven't investigated that much further > yet, but libpthread seems to fail in create_stack() from > _pthread_create() from _thr_start_sig_daemon(). See my response to this in a previous reply to this thread. libthr and libpthread use LDT's for TLS. WINE is stomping on them because it doesn't properly create LDTs. This is not a problem with either of the thread libraries and this issue has been known ever since we implemented TLS years ago. -- DE From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 24 15:43:41 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D803F16A4DA; Mon, 24 Jul 2006 15:43:41 +0000 (UTC) (envelope-from gerald@pfeifer.com) Received: from vexpert.dbai.tuwien.ac.at (vexpert.dbai.tuwien.ac.at [128.131.111.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7028343D4C; Mon, 24 Jul 2006 15:43:41 +0000 (GMT) (envelope-from gerald@pfeifer.com) Received: from acrux.dbai.tuwien.ac.at (acrux [128.131.111.60]) by vexpert.dbai.tuwien.ac.at (Postfix) with ESMTP id 7221C137B4; Mon, 24 Jul 2006 17:43:40 +0200 (CEST) Received: by acrux.dbai.tuwien.ac.at (Postfix, from userid 1203) id 9E4EF1A7C2; Mon, 24 Jul 2006 17:43:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by acrux.dbai.tuwien.ac.at (Postfix) with ESMTP id 8E33D1A7C0; Mon, 24 Jul 2006 17:43:44 +0200 (CEST) Date: Mon, 24 Jul 2006 17:43:44 +0200 (CEST) From: Gerald Pfeifer To: Daniel Eischen In-Reply-To: Message-ID: References: <200607221914.15826.lofi@freebsd.org> <200607241706.08396.tijl@ulyssis.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-emulation@freebsd.org, Michael Nottebrock , freebsd-hackers@freebsd.org Subject: Re: [emulation] WINE vs. FreeBSD 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, 24 Jul 2006 15:43:42 -0000 On Mon, 24 Jul 2006, Daniel Eischen wrote: > See my response to this in a previous reply to this thread. libthr > and libpthread use LDT's for TLS. WINE is stomping on them because > it doesn't properly create LDTs. This is not a problem with either > of the thread libraries and this issue has been known ever since we > implemented TLS years ago. If someone could help getting this address in Wine, this would be really cool! Gerald From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 24 16:39:48 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CC5B16A4DA; Mon, 24 Jul 2006 16:39:48 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from outmx004.isp.belgacom.be (outmx004.isp.belgacom.be [195.238.4.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id E917543D5D; Mon, 24 Jul 2006 16:39:47 +0000 (GMT) (envelope-from tijl@ulyssis.org) Received: from outmx004.isp.belgacom.be (localhost [127.0.0.1]) by outmx004.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k6OGdihO020084; Mon, 24 Jul 2006 18:39:45 +0200 (envelope-from ) Received: from kalimero.kotnet.org (88.193-245-81.adsl-dyn.isp.belgacom.be [81.245.193.88]) by outmx004.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k6OGdZlX019995; Mon, 24 Jul 2006 18:39:35 +0200 (envelope-from ) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.13.6/8.13.6) with ESMTP id k6OGdSqf072006; Mon, 24 Jul 2006 18:39:29 +0200 (CEST) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-emulation@freebsd.org, Daniel Eischen Date: Mon, 24 Jul 2006 18:39:22 +0200 User-Agent: KMail/1.9.3 References: <200607221914.15826.lofi@freebsd.org> <200607241706.08396.tijl@ulyssis.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8584442.zxQZd1tTzu"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200607241839.28229.tijl@ulyssis.org> Cc: freebsd-hackers@freebsd.org, Michael Nottebrock Subject: Re: WINE vs. FreeBSD 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, 24 Jul 2006 16:39:48 -0000 --nextPart8584442.zxQZd1tTzu Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 24 July 2006 17:39, Daniel Eischen wrote: > On Mon, 24 Jul 2006, Tijl Coosemans wrote: > > I've attached two patches that accomplish this, but this seems to > > trigger other problems, so use at your own risk. If you want to try > > them, place them in the port's files/ directory and add a line > > containing "USE_AUTOTOOLS=3D autoconf:259" to the Makefile. This > > seems to break wine+libpthread, so I've also changed the port to > > use libthr instead. > > > > For the libpthread experts, I haven't investigated that much > > further yet, but libpthread seems to fail in create_stack() from > > _pthread_create() from _thr_start_sig_daemon(). > > See my response to this in a previous reply to this thread. libthr > and libpthread use LDT's for TLS. WINE is stomping on them because > it doesn't properly create LDTs. This is not a problem with either > of the thread libraries and this issue has been known ever since we > implemented TLS years ago. And as I stated later on in that thread, I don't see where libpthread=20 and libthr still use LDT entries. As far as I understand the code,=20 instead of using an LDT entry per thread (as it sure used to be), only=20 one single GDT entry is used whose base address is updated during a=20 context switch. Looking at the cvs history, it has been working like=20 this since a couple commits of Peter Wemm about a year ago. And if nothing but Wine uses the LDT, Wine's static allocation of LDT=20 entries can't be the problem. --nextPart8584442.zxQZd1tTzu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQBExPfAdMR2xnarec8RAozJAJ0R/bow6no5XbyepuehSZK+AzyTWACbBYMj ippogN6v63focdD6woOHifE= =tENU -----END PGP SIGNATURE----- --nextPart8584442.zxQZd1tTzu-- From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 24 16:49:27 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DE2916A598; Mon, 24 Jul 2006 16:49:27 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2331C43D53; Mon, 24 Jul 2006 16:49:26 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.7/8.13.7/NETPLEX) with ESMTP id k6OGnPBx017909; Mon, 24 Jul 2006 12:49:25 -0400 (EDT) Date: Mon, 24 Jul 2006 12:49:25 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Tijl Coosemans In-Reply-To: <200607241839.28229.tijl@ulyssis.org> Message-ID: References: <200607221914.15826.lofi@freebsd.org> <200607241706.08396.tijl@ulyssis.org> <200607241839.28229.tijl@ulyssis.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, Michael Nottebrock Subject: Re: WINE vs. FreeBSD X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2006 16:49:27 -0000 On Mon, 24 Jul 2006, Tijl Coosemans wrote: > On Monday 24 July 2006 17:39, Daniel Eischen wrote: >> On Mon, 24 Jul 2006, Tijl Coosemans wrote: >>> I've attached two patches that accomplish this, but this seems to >>> trigger other problems, so use at your own risk. If you want to try >>> them, place them in the port's files/ directory and add a line >>> containing "USE_AUTOTOOLS= autoconf:259" to the Makefile. This >>> seems to break wine+libpthread, so I've also changed the port to >>> use libthr instead. >>> >>> For the libpthread experts, I haven't investigated that much >>> further yet, but libpthread seems to fail in create_stack() from >>> _pthread_create() from _thr_start_sig_daemon(). >> >> See my response to this in a previous reply to this thread. libthr >> and libpthread use LDT's for TLS. WINE is stomping on them because >> it doesn't properly create LDTs. This is not a problem with either >> of the thread libraries and this issue has been known ever since we >> implemented TLS years ago. > > And as I stated later on in that thread, I don't see where libpthread > and libthr still use LDT entries. As far as I understand the code, > instead of using an LDT entry per thread (as it sure used to be), only > one single GDT entry is used whose base address is updated during a > context switch. Looking at the cvs history, it has been working like > this since a couple commits of Peter Wemm about a year ago. > > And if nothing but Wine uses the LDT, Wine's static allocation of LDT > entries can't be the problem. Look, we use %gs for TLS, period. Go see libpthread/arch/i386/i386/pthread_md.c for how libpthread does it. TLS would not work without setting aside a register for the threads library (and rtld) to use. -- DE From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 24 18:38:39 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53FAA16A4DD; Mon, 24 Jul 2006 18:38:39 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0982143D46; Mon, 24 Jul 2006 18:38:37 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.18.229]) ([10.251.18.229]) by a50.ironport.com with ESMTP; 24 Jul 2006 11:38:37 -0700 Message-ID: <44C513AD.70505@elischer.org> Date: Mon, 24 Jul 2006 11:38:37 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gerald Pfeifer References: <200607221914.15826.lofi@freebsd.org> <200607241706.08396.tijl@ulyssis.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Daniel Eischen , freebsd-emulation@freebsd.org, Michael Nottebrock , freebsd-hackers@freebsd.org Subject: Re: [emulation] WINE vs. FreeBSD 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, 24 Jul 2006 18:38:39 -0000 Gerald Pfeifer wrote: >On Mon, 24 Jul 2006, Daniel Eischen wrote: > > >>See my response to this in a previous reply to this thread. libthr >>and libpthread use LDT's for TLS. WINE is stomping on them because >>it doesn't properly create LDTs. This is not a problem with either >>of the thread libraries and this issue has been known ever since we >>implemented TLS years ago. >> >> > >If someone could help getting this address in Wine, this would be >really cool! > > wine assumes it knows what LDTs it wants and goes for them by name. FreeBSD expects you to let it give you the next free one. >Gerald >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > From owner-freebsd-emulation@FreeBSD.ORG Tue Jul 25 01:58:36 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1373C16A4DA; Tue, 25 Jul 2006 01:58:36 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from outmx001.isp.belgacom.be (outmx001.isp.belgacom.be [195.238.5.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 541ED43D45; Tue, 25 Jul 2006 01:58:35 +0000 (GMT) (envelope-from tijl@ulyssis.org) Received: from outmx001.isp.belgacom.be (localhost [127.0.0.1]) by outmx001.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k6P1wXqR031458; Tue, 25 Jul 2006 03:58:33 +0200 (envelope-from ) Received: from kalimero.kotnet.org (233.121-247-81.adsl-dyn.isp.belgacom.be [81.247.121.233]) by outmx001.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k6P1wSs4031404; Tue, 25 Jul 2006 03:58:28 +0200 (envelope-from ) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.13.6/8.13.6) with ESMTP id k6P1wLYs099116; Tue, 25 Jul 2006 03:58:22 +0200 (CEST) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-emulation@freebsd.org, Daniel Eischen Date: Tue, 25 Jul 2006 03:58:06 +0200 User-Agent: KMail/1.9.3 References: <200607221914.15826.lofi@freebsd.org> <200607241839.28229.tijl@ulyssis.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2198738.aAC9hlQsmE"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200607250358.21457.tijl@ulyssis.org> Cc: freebsd-hackers@freebsd.org, Michael Nottebrock Subject: Re: WINE vs. FreeBSD 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: Tue, 25 Jul 2006 01:58:36 -0000 --nextPart2198738.aAC9hlQsmE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 24 July 2006 18:49, Daniel Eischen wrote: > On Mon, 24 Jul 2006, Tijl Coosemans wrote: > > On Monday 24 July 2006 17:39, Daniel Eischen wrote: > >> On Mon, 24 Jul 2006, Tijl Coosemans wrote: > >>> I've attached two patches that accomplish this, but this seems to > >>> trigger other problems, so use at your own risk. If you want to > >>> try them, place them in the port's files/ directory and add a > >>> line containing "USE_AUTOTOOLS=3D autoconf:259" to the Makefile. > >>> This seems to break wine+libpthread, so I've also changed the > >>> port to use libthr instead. > >>> > >>> For the libpthread experts, I haven't investigated that much > >>> further yet, but libpthread seems to fail in create_stack() from > >>> _pthread_create() from _thr_start_sig_daemon(). > >> > >> See my response to this in a previous reply to this thread.=20 > >> libthr and libpthread use LDT's for TLS. WINE is stomping on them > >> because it doesn't properly create LDTs. This is not a problem > >> with either of the thread libraries and this issue has been known > >> ever since we implemented TLS years ago. > > > > And as I stated later on in that thread, I don't see where > > libpthread and libthr still use LDT entries. As far as I understand > > the code, instead of using an LDT entry per thread (as it sure used > > to be), only one single GDT entry is used whose base address is > > updated during a context switch. Looking at the cvs history, it has > > been working like this since a couple commits of Peter Wemm about a > > year ago. > > > > And if nothing but Wine uses the LDT, Wine's static allocation of > > LDT entries can't be the problem. > > Look, we use %gs for TLS, period. Go see > libpthread/arch/i386/i386/pthread_md.c for how libpthread does it.=20 > TLS would not work without setting aside a register for the threads > library (and rtld) to use. Aaarrrrgghhh :) What you say is true of course, but %gs points to a GDT entry, not LDT.=20 libpthread and libthr no longer use LDT entries... There would be a problem of course if Wine or Windows programs=20 change %gs. Wine does seem to touch %gs but I've never actually seen it=20 change. It's always 0x001B, which is the correct value (GUGS_SEL). However, Wine/Windows uses %fs for TLS and it appears that the FreeBSD=20 kernel doesn't preserve it. It always ends up pointing to GUDATA_SEL. --nextPart2198738.aAC9hlQsmE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQBExXq9dMR2xnarec8RAqulAJ4yxbyI98xm5NNR435SSjVRexBPGQCePcQC 2CrH4OPfAvSy7sojjFCyfg8= =hOSN -----END PGP SIGNATURE----- --nextPart2198738.aAC9hlQsmE-- From owner-freebsd-emulation@FreeBSD.ORG Tue Jul 25 07:18:46 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B45216A4DD for ; Tue, 25 Jul 2006 07:18:46 +0000 (UTC) (envelope-from philippe.sam-long@laposte.net) Received: from mx.laposte.net (mx.laposte.net [81.255.54.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id E218843D5E for ; Tue, 25 Jul 2006 07:18:45 +0000 (GMT) (envelope-from philippe.sam-long@laposte.net) Received: from [10.0.11.13] (212.234.86.115) by mx.laposte.net (7.2.060.1) (authenticated as philippe.sam-long) id 449A9F41017E4E61 for freebsd-emulation@freebsd.org; Tue, 25 Jul 2006 09:18:45 +0200 From: Philippe Organization: Erival To: freebsd-emulation@freebsd.org Date: Thu, 13 Jul 2006 20:04:20 +0200 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607132004.21234.philippe.sam-long@laposte.net> Subject: gentoo compat problem 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: Tue, 25 Jul 2006 07:18:46 -0000 Hello, I'm having a problem with the linux_dist-gentoo-stage3 and linux_base-gentoo-stage3 ports. After installing the port, mounting devfs on /usr/local/gentoo-stage3/dev and linprocfs on /usr/local/gentoo-stage3/proc, I chroot to /usr/local/gentoo-stage3 executing bash, and proceed to an "emerge sync", It's impossible then to bootstrap or even just update portage. In effect, any emerge will install files that should be executable to /usr/bin with unusual mode masks. This problem occurs wether using linux_base-fc4 or linux_base-gentoo-stage3 as a linux base. /usr/local/gentoo-stage3/ is mounted on a separate UFS partition. I'm running FreeBSD 6.1 on an Athlon XP Pro with the current ports tree. Thanks, philippe From owner-freebsd-emulation@FreeBSD.ORG Tue Jul 25 17:53:14 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF0E516A4DA; Tue, 25 Jul 2006 17:53:14 +0000 (UTC) (envelope-from qemu-l@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4436C43D8B; Tue, 25 Jul 2006 17:52:21 +0000 (GMT) (envelope-from qemu-l@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn [127.0.0.1]) by gwyn.kn-bremen.de (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k6PHqJhb006940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 25 Jul 2006 19:52:19 +0200 Received: from saturn.kn-bremen.de (uucp@localhost) by gwyn.kn-bremen.de (8.13.4/8.13.4/Submit) with UUCP id k6PHqJ9e006938; Tue, 25 Jul 2006 19:52:19 +0200 Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.6/8.13.6) with ESMTP id k6PHlKx7016455; Tue, 25 Jul 2006 19:47:20 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.6/8.13.6/Submit) id k6PHlJGh016454; Tue, 25 Jul 2006 19:47:19 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Tue, 25 Jul 2006 19:47:19 +0200 To: freebsd-emulation@freebsd.org, freebsd-usb@freebsd.org, qemu-devel@nongnu.org Message-ID: <20060725174719.GA16116@saturn.kn-bremen.de> Mail-Followup-To: freebsd-emulation@freebsd.org, freebsd-usb@freebsd.org, qemu-devel@nongnu.org References: <20060723224041.GA20196@saturn.kn-bremen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060723224041.GA20196@saturn.kn-bremen.de> User-Agent: Mutt/1.5.11 Cc: Subject: Re: FreeBSD qemu 0.8.2 update - please test! (and usb cardreader SET_ADDR_FAILED) 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: Tue, 25 Jul 2006 17:53:15 -0000 On Mon, Jul 24, 2006 at 12:40:41AM +0200, Juergen Lock wrote: > With the help of Lonnie Mendez (he updated his usb host support patch) > I just put together an experimental qemu port update. For some reason > my usb cardreader didnt want to work today: > uhub1: device problem (SET_ADDR_FAILED), disabling port 1 > (anyone have an idea about this one? this is the first time i tried using > it since I updated this box to 6.1), so the usb host support is untested. > > To test usb best run qemu with -monitor stdio, then do `info usbhost' > when its running and then `usb_add host:' where x.y is the host > device you want to add (`plug into' the guest). also see the port's > pkg-message. some quick test have been done on usb now (cardreader started working again without me doing anything), also Bakul Shah tested usb with a w2k guest. usb is slow tho... (and watch out for the new pkg-message note below.) Also Jung-uk Kim made me aware that FreeBSD has clock_gettime(2) too and provided a patch to enable it. And I noted -kernel-kqemu doesnt seem to be faster than `regular' kqemu anymore (subjectively it once even seemd a little slower!), example startup time of root shell xterm on KANOTIX-2006-Easter-RC4.iso went up from maybe 5 to over 20 seconds, and qemu now takes some 30% cpu here even when the guest is idle. And, I got two qemu hangs (guest suddenly hangs completly, qemu eating 99% cpu) with -kernel-kqemu. So, if anyone has any ideas about this... (can the new timing code slow things down that much?) Oh, host has a single 2.0something GHz athlon cpu and 512 MB ram. new qemu port update below, enjoy, Juergen Removed files: files/patch-malc-17h_aqemu files/patch-sdl.c Index: Makefile =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/Makefile,v retrieving revision 1.53 diff -u -r1.53 Makefile --- Makefile 23 Jul 2006 00:04:01 -0000 1.53 +++ Makefile 23 Jul 2006 15:51:45 -0000 @@ -6,8 +6,7 @@ # PORTNAME= qemu -PORTVERSION= 0.8.1 -PORTREVISION= 2 +PORTVERSION= 0.8.2 CATEGORIES= emulators MASTER_SITES= http://www.qemu.org/:release \ http://people.fruitsalad.org/nox/qemu/:snapshot \ Index: distinfo =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/distinfo,v retrieving revision 1.31 diff -u -r1.31 distinfo --- distinfo 6 May 2006 16:15:41 -0000 1.31 +++ distinfo 23 Jul 2006 15:52:26 -0000 @@ -1,6 +1,6 @@ -MD5 (qemu/qemu-0.8.1.tar.gz) = 67d924324a5ab79d017bd97a1e767285 -SHA256 (qemu/qemu-0.8.1.tar.gz) = a1f83666f5c05eaee9bfc608a3a5034ad95d0fd3c99937bb399bf9235a6aa0c9 -SIZE (qemu/qemu-0.8.1.tar.gz) = 1623264 +MD5 (qemu/qemu-0.8.2.tar.gz) = 5b3a89eb2f256a8a6f3bb07f7b3f1b07 +SHA256 (qemu/qemu-0.8.2.tar.gz) = 2a20d811296c859d678bdd002222aa7ca7951a641327234f3af144e822d078f3 +SIZE (qemu/qemu-0.8.2.tar.gz) = 1810909 MD5 (qemu/patch3_cirrus) = ebe7ed9fce804c49e024bc93bfdfc810 SHA256 (qemu/patch3_cirrus) = e862371834b7d895a896fbdb84fd9f70d17b5729a6f6789a48a61504fc941e11 SIZE (qemu/patch3_cirrus) = 8817 Index: pkg-descr =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/pkg-descr,v retrieving revision 1.3 diff -u -r1.3 pkg-descr --- pkg-descr 19 Jul 2005 06:06:56 -0000 1.3 +++ pkg-descr 23 Jul 2006 17:46:11 -0000 @@ -12,9 +12,9 @@ cross-debugging. As QEMU requires no host kernel patches to run, it is very safe and easy to use. -(but kqemu is now also supported for the i386 on i386 case) +(but kqemu is now also supported for the i386 on i386 and amd64 case) See also the preconfigured system images on http://oszoo.org/ Many live cd isos also work. -WWW: http://fabrice.bellard.free.fr/qemu/ +WWW: http://qemu.org/ Index: pkg-message =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/pkg-message,v retrieving revision 1.13 diff -u -r1.13 pkg-message --- pkg-message 23 Jul 2006 00:04:01 -0000 1.13 +++ pkg-message 25 Jul 2006 17:12:19 -0000 @@ -45,4 +45,9 @@ add path 'ugen*' mode 660 group operator corresponding rc.conf line: devfs_system_ruleset="ugen_ruleset" +- still usb: since the hub is no longer attached to the uchi controller +and the wakeup mechanism, resume interrupt is not implemented yet linux +guests will suspend the bus, i.e. they wont see devices usb_add'ed after +its (linux') uhci module got loaded. workaround: either add devices +before linux loads the module or rmmod and modprobe it afterwards. ==== Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/pkg-plist,v retrieving revision 1.15 diff -u -r1.15 pkg-plist --- pkg-plist 19 May 2006 08:17:54 -0000 1.15 +++ pkg-plist 23 Jul 2006 17:41:29 -0000 @@ -13,7 +13,7 @@ %%DATADIR%%/vgabios.bin %%DATADIR%%/vgabios-cirrus.bin %%DATADIR%%/ppc_rom.bin -%%DATADIR%%/proll.elf +%%DATADIR%%/openbios-sparc32 %%DATADIR%%/video.x %%DATADIR%%/keymaps/ar %%DATADIR%%/keymaps/common Index: files/patch-be =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/files/patch-be,v retrieving revision 1.2 diff -u -r1.2 patch-be --- files/patch-be 1 May 2005 07:39:11 -0000 1.2 +++ files/patch-be 25 Jul 2006 17:09:30 -0000 @@ -1,16 +1,31 @@ +Index: qemu/Makefile.target +@@ -404,7 +404,9 @@ + ifndef CONFIG_DARWIN + ifndef CONFIG_WIN32 + ifndef CONFIG_SOLARIS +-VL_LIBS=-lutil -lrt ++#VL_LIBS=-lutil -lrt ++# XXX this cant be just merged back... ++VL_LIBS=-lutil + endif + endif + endif Index: qemu/vl.c -@@ -662,6 +662,14 @@ - case QEMU_TIMER_REALTIME: - #ifdef _WIN32 - return GetTickCount(); -+#elif defined(_BSD) -+ { -+ struct timeval r; -+ if (!gettimeofday(&r, NULL)) { -+ return ((timer_freq * 1000LL) * (int64_t)r.tv_sec -+ + ((int64_t)r.tv_usec * timer_freq) / 1000) / timer_freq; -+ } -+ } - #else - { - struct tms tp; +@@ -541,7 +541,7 @@ + static void init_get_clock(void) + { + use_rt_clock = 0; +-#if defined(__linux__) ++#if defined(__linux__) || defined(__FreeBSD__) + { + struct timespec ts; + if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) { +@@ -553,7 +553,7 @@ + + static int64_t get_clock(void) + { +-#if defined(__linux__) ++#if defined(__linux__) || defined(__FreeBSD__) + if (use_rt_clock) { + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); Index: files/patch-bsdusb.patch =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/files/patch-bsdusb.patch,v retrieving revision 1.4 diff -u -r1.4 patch-bsdusb.patch --- files/patch-bsdusb.patch 29 Apr 2006 09:15:50 -0000 1.4 +++ files/patch-bsdusb.patch 23 Jul 2006 19:58:22 -0000 @@ -1,6 +1,5 @@ Index: qemu/configure -@@ -122,7 +122,8 @@ - *) +@@ -134,6 +134,7 @@ oss="yes" linux="yes" user="yes" @@ -8,18 +7,19 @@ if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then kqemu="yes" fi -@@ -131,6 +132,7 @@ +@@ -143,6 +144,7 @@ if [ "$bsd" = "yes" ] ; then - if [ ! "$darwin" = "yes" ] ; then + if [ "$darwin" != "yes" ] ; then make="gmake" + usb="bsd" fi fi -@@ -656,6 +675,19 @@ - echo "#define _BSD 1" >> $config_h +@@ -724,6 +726,19 @@ fi + echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h ++ +# USB host support +case "$usb" in +linux) @@ -32,20 +32,19 @@ + echo "HOST_USB=stub" >> $config_mak +;; +esac -+ - for target in $target_list; do + for target in $target_list; do target_dir="$target" Index: qemu/Makefile.target -@@ -303,7 +303,7 @@ - endif +@@ -329,7 +329,7 @@ + VL_OBJS+= scsi-disk.o cdrom.o lsi53c895a.o # USB layer --VL_OBJS+= usb.o usb-hub.o usb-uhci.o usb-linux.o usb-hid.o -+VL_OBJS+= usb.o usb-hub.o usb-uhci.o usb-$(HOST_USB).o usb-hid.o +-VL_OBJS+= usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o ++VL_OBJS+= usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-ohci.o usb-msd.o # PCI network cards - VL_OBJS+= ne2000.o rtl8139.o + VL_OBJS+= ne2000.o rtl8139.o pcnet.o Index: qemu/usb-stub.c @@ -0,0 +1,11 @@ +#include "vl.h" @@ -60,11 +59,11 @@ + return NULL; +} Index: qemu/usb-bsd.c -@@ -0,0 +1,592 @@ +@@ -0,0 +1,603 @@ +/* + * BSD host USB redirector + * -+ * Copyright (c) 2005 Lonnie Mendez ++ * Copyright (c) 2006 Lonnie Mendez + * Portions of code and concepts borrowed from + * usb-linux.c and libusb's bsd.c and are copyright their respective owners. + * @@ -336,6 +335,23 @@ + } +} + ++static void usb_host_handle_destroy(USBDevice *opaque) ++{ ++ USBHostDevice *s = (USBHostDevice *)opaque; ++ int i; ++ ++ for (i = 0; i < USB_MAX_ENDPOINTS; i++) ++ if (s->ep_fd[i] >= 0) ++ close(s->ep_fd[i]); ++ ++ if (s->devfd < 0) ++ return; ++ ++ close(s->devfd); ++ ++ qemu_free(s); ++} ++ +USBDevice *usb_host_device_open(const char *devname) +{ + struct usb_device_info bus_info, dev_info; @@ -409,8 +425,16 @@ + dev->dev.handle_reset = usb_host_handle_reset; + dev->dev.handle_control = usb_host_handle_control; + dev->dev.handle_data = usb_host_handle_data; ++ dev->dev.handle_destroy = usb_host_handle_destroy; ++ ++ if (strncmp(dev_info.udi_product, "product", 7) != 0) ++ pstrcpy(dev->dev.devname, sizeof(dev->dev.devname), ++ dev_info.udi_product); ++ else ++ snprintf(dev->dev.devname, sizeof(dev->dev.devname), ++ "host:%s", devname); + -+ strcpy(dev->devpath, "/dev/"); ++ pstrcpy(dev->devpath, sizeof(dev->devpath), "/dev/"); + strcat(dev->devpath, dev_info.udi_devnames[0]); + + /* Mark the endpoints as not yet open */ @@ -426,21 +450,6 @@ + return NULL; +} + -+void usb_host_device_close(USBDevice *opaque) -+{ -+ USBHostDevice *s = (USBHostDevice *)opaque; -+ int i; -+ -+ for (i = 0; i < USB_MAX_ENDPOINTS; i++) -+ if (s->ep_fd[i] >= 0) -+ close(s->ep_fd[i]); -+ -+ if (s->devfd < 0) -+ return; -+ -+ close(s->devfd); -+} -+ +static int usb_host_scan(void *opaque, USBScanFunc *func) +{ + struct usb_device_info bus_info; @@ -494,7 +503,8 @@ + speed = dev_info.udi_speed; + + if (strncmp(dev_info.udi_product, "product", 7) != 0) -+ strcpy(product_name, dev_info.udi_product); ++ pstrcpy(product_name, sizeof(product_name), ++ dev_info.udi_product); + else + product_name[0] = '\0'; + @@ -653,55 +663,6 @@ +{ + usb_host_scan(NULL, usb_host_info_device); +} -Index: qemu/vl.c -@@ -3245,14 +3258,17 @@ - dev = usb_host_device_open(p); - if (!dev) - return -1; -+ dev->isproxied = 1; - } else if (!strcmp(devname, "mouse")) { - dev = usb_mouse_init(); - if (!dev) - return -1; -+ dev->isproxied = 0; - } else if (!strcmp(devname, "tablet")) { - dev = usb_tablet_init(); - if (!dev) - return -1; -+ dev->isproxied = 0; - } else { - return -1; - } -@@ -3281,6 +3297,8 @@ - if (dev && dev->addr == addr) - break; - } -+ if (dev && dev->isproxied) -+ usb_host_device_close(dev); - if (i == MAX_VM_USB_PORTS) - return -1; - usb_attach(vm_usb_ports[i], NULL); -Index: qemu/hw/usb.h -@@ -135,6 +146,8 @@ - int setup_state; - int setup_len; - int setup_index; -+ -+ int isproxied; - }; - - /* USB port on which a device can be connected */ -@@ -157,8 +170,9 @@ - /* usb-uhci.c */ - void usb_uhci_init(PCIBus *bus, USBPort **usb_ports); - --/* usb-linux.c */ -+/* host proxy functions */ - USBDevice *usb_host_device_open(const char *devname); -+void usb_host_device_close(USBDevice *dev); - void usb_host_info(void); - - /* usb-hid.c */ Index: qemu/usb-linux.c @@ -23,7 +23,6 @@ */ @@ -710,23 +671,8 @@ -#if defined(__linux__) #include #include - #include -@@ -255,6 +254,14 @@ - return q - buf; - } - -+void usb_host_device_close(USBDevice *opaque) -+{ -+ USBHostDevice *s = (USBHostDevice *)opaque; -+ -+ if (s->fd >= 0) -+ close(s->fd); -+} -+ - static int usb_host_scan(void *opaque, USBScanFunc *func) - { - FILE *f; -@@ -468,18 +475,3 @@ + #include +@@ -505,18 +504,3 @@ { usb_host_scan(NULL, usb_host_info_device); } Index: files/patch-fbsd =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/files/patch-fbsd,v retrieving revision 1.7 diff -u -r1.7 patch-fbsd --- files/patch-fbsd 6 May 2006 16:15:41 -0000 1.7 +++ files/patch-fbsd 23 Jul 2006 16:15:26 -0000 @@ -1,21 +1,17 @@ Index: qemu/Makefile -@@ -13,11 +13,14 @@ +@@ -25,7 +25,10 @@ + DOCS= endif - DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 - --all: dyngen$(EXESUF) $(TOOLS) $(DOCS) -+all: bsd/libmath.a dyngen$(EXESUF) $(TOOLS) $(DOCS) - for d in $(TARGET_DIRS); do \ - $(MAKE) -C $$d $@ || exit 1 ; \ - done +-all: $(TOOLS) $(DOCS) recurse-all ++all: bsd/libmath.a $(TOOLS) $(DOCS) recurse-all ++ +bsd/libmath.a: + ( cd bsd ; $(BSD_MAKE) CC=$(CC) ) -+ - qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c - $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) -@@ -26,6 +29,7 @@ + subdir-%: dyngen$(EXESUF) + $(MAKE) -C $(subst subdir-,,$@) all +@@ -40,6 +43,7 @@ clean: # avoid old build problems by removing potentially incorrect old files @@ -36,7 +32,7 @@ cocoa.o: cocoa.m $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< Index: qemu/fpu/softfloat-native.c -@@ -2,11 +2,15 @@ +@@ -2,11 +2,14 @@ context is supported */ #include "softfloat.h" #include @@ -47,21 +43,20 @@ void set_float_rounding_mode(int val STATUS_PARAM) { STATUS(float_rounding_mode) = val; --#if defined(_BSD) && !defined(__APPLE__) -+#if defined(_BSD) && !defined(__APPLE__) && \ -+ (defined(__FreeBSD__) && __FreeBSD_version < 500000) +-#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) ++#if (defined(_BSD) && (defined(__FreeBSD__) && __FreeBSD_version < 500000)) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) fpsetround(val); #elif defined(__arm__) /* nothing to do */ -@@ -22,7 +26,7 @@ +@@ -22,7 +25,7 @@ } #endif --#if defined(_BSD) -+#if defined(_BSD) && !defined(__FreeBSD__) - #define lrint(d) ((long)rint(d)) - #define llrint(d) ((long long)rint(d)) - #endif +-#if defined(_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) ++#if (defined(_BSD) && !defined(__FreeBSD__)) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) + #define lrint(d) ((int32_t)rint(d)) + #define llrint(d) ((int64_t)rint(d)) + #define lrintf(f) ((int32_t)rint(f)) Index: qemu/fpu/softfloat-native.h @@ -1,8 +1,28 @@ /* Native implementation of soft float functions */ Index: files/patch-vl.c =================================================================== RCS file: /home/ncvs/ports/emulators/qemu/files/patch-vl.c,v retrieving revision 1.3 diff -u -r1.3 patch-vl.c --- files/patch-vl.c 3 Dec 2005 03:18:40 -0000 1.3 +++ files/patch-vl.c 25 Jul 2006 17:19:37 -0000 @@ -1,6 +1,5 @@ ---- vl.c.orig Mon Nov 14 15:55:56 2005 -+++ vl.c Mon Nov 14 15:57:25 2005 -@@ -1363,7 +1367,7 @@ +Index: qemu/vl.c +@@ -1510,7 +1510,7 @@ return chr; } @@ -8,8 +7,8 @@ +#if defined(__linux__) || defined(__FreeBSD__) CharDriverState *qemu_chr_open_pty(void) { - char slave_name[1024]; -@@ -1509,6 +1513,7 @@ + struct termios tty; +@@ -1665,6 +1665,7 @@ return chr; } @@ -17,11 +16,11 @@ static int pp_ioctl(CharDriverState *chr, int cmd, void *arg) { int fd = (int)chr->opaque; -@@ -1571,6 +1576,7 @@ +@@ -1727,6 +1728,7 @@ chr->chr_ioctl = pp_ioctl; return chr; } -+#endif ++#endif /* defined(__linux__) */ #else CharDriverState *qemu_chr_open_pty(void) From owner-freebsd-emulation@FreeBSD.ORG Tue Jul 25 23:06:25 2006 Return-Path: X-Original-To: freebsd-emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5778A16A4DE; Tue, 25 Jul 2006 23:06:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76F5943D49; Tue, 25 Jul 2006 23:06:24 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.1/8.13.1) with ESMTP id k6PN6N40009196; Tue, 25 Jul 2006 19:06:23 -0400 (EDT) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-emulation@FreeBSD.org Date: Tue, 25 Jul 2006 19:06:02 -0400 User-Agent: KMail/1.6.2 References: <20060723224041.GA20196@saturn.kn-bremen.de> <20060725174719.GA16116@saturn.kn-bremen.de> In-Reply-To: <20060725174719.GA16116@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200607251906.10687.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.88/1618/Mon Jul 24 21:12:40 2006 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: freebsd-usb@FreeBSD.org, Juergen Lock , qemu-devel@nongnu.org Subject: Re: FreeBSD qemu 0.8.2 update - please test! (and usb cardreader SET_ADDR_FAILED) 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: Tue, 25 Jul 2006 23:06:25 -0000 On Tuesday 25 July 2006 01:47 pm, Juergen Lock wrote: > @@ -47,21 +43,20 @@ > void set_float_rounding_mode(int val STATUS_PARAM) > { > STATUS(float_rounding_mode) = val; > --#if defined(_BSD) && !defined(__APPLE__) > -+#if defined(_BSD) && !defined(__APPLE__) && \ > -+ (defined(__FreeBSD__) && __FreeBSD_version < 500000) > +-#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) > ++#if (defined(_BSD) && (defined(__FreeBSD__) && __FreeBSD_version < 500000)) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) > fpsetround(val); > #elif defined(__arm__) > /* nothing to do */ FYI, a parenthesis is misplaced (Note: I just rearranged the order to be more clearer): +-#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) ++#if (defined(_BSD) && !defined(__APPLE__) && (defined(__FreeBSD__) && __FreeBSD_version < 500000)) || \ ++ (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) Actually it is an upstream bug, though. Thanks, Jung-uk Kim From owner-freebsd-emulation@FreeBSD.ORG Thu Jul 27 09:29:53 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C29EB16A4DD for ; Thu, 27 Jul 2006 09:29:53 +0000 (UTC) (envelope-from maxx@bds.ru) Received: from mx.satgate.net (mx.satgate.net [212.44.93.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFBEA43D49 for ; Thu, 27 Jul 2006 09:29:52 +0000 (GMT) (envelope-from maxx@bds.ru) Received: from [212.44.94.156] (helo=212.44.94.156.satgate.net) by mx.satgate.net with esmtpa (Exim 4.61) (envelope-from ) id 1G62Bh-0004rR-HT for freebsd-emulation@freebsd.org; Thu, 27 Jul 2006 12:29:49 +0300 From: "Maxim P. Kondakov" To: freebsd-emulation@freebsd.org Date: Thu, 27 Jul 2006 12:29:49 +0300 User-Agent: KMail/1.9.3 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607271229.49495.maxx@bds.ru> Subject: linux-opera does not work after updating linux_base-fc3 to linux_base-fc4 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: maxx@bds.ru List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jul 2006 09:29:53 -0000 Good Day, Maintainers. I have a problem with linux-opera. After updating linux_base-fc3 to linux_base-fc4 linux-opera does not start with the following messages on the screen: $ linux-opera /usr/X11R6/share/linux-opera/bin/opera: /usr/lib/libc.so.6: version `GLIBC_2.3.4' not found (required by /usr/X11R6/lib/libX11.so.6) /usr/X11R6/share/linux-opera/bin/opera: /usr/lib/libc.so.6: version `GLIBC_2.3' not found (required by /usr/X11R6/lib/libX11.so.6) /usr/X11R6/share/linux-opera/bin/opera: /usr/lib/libc.so.6: version `GLIBC_2.3.2' not found (required by /usr/X11R6/lib/libX11.so.6) /usr/X11R6/share/linux-opera/bin/opera: /usr/lib/libc.so.6: version `GLIBC_2.3.4' not found (required by /usr/X11R6/lib/libXext.so.6) /usr/X11R6/share/linux-opera/bin/opera: /usr/lib/libc.so.6: version `GLIBC_2.3.4' not found (required by /usr/X11R6/lib/libSM.so.6) /usr/X11R6/share/linux-opera/bin/opera: /usr/lib/libc.so.6: version `GLIBC_2.3.4' not found (required by /usr/X11R6/lib/libICE.so.6) /usr/X11R6/share/linux-opera/bin/opera: /usr/lib/libc.so.6: version `GLIBC_2.3' not found (required by /usr/X11R6/lib/libICE.so.6) /usr/X11R6/share/linux-opera/bin/opera: /usr/lib/libc.so.6: version `GLIBC_2.3.4' not found (required by /usr/lib/libz.so.1) $ I can not install default linux_base port due to IGNORE status of it, and can not install linux_base-fc3 back because it was removed from the FreeBSD port collection. Is there any workaround for this problem? I'm using linux-opera-9.0.20060616_1 and FreeBSD 5.5-RELEASE-p2. WBR, Maxim Kondakov From owner-freebsd-emulation@FreeBSD.ORG Thu Jul 27 09:55:31 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10CE716A4DD for ; Thu, 27 Jul 2006 09:55:31 +0000 (UTC) (envelope-from mag@intron.ac) Received: from smtp.263.net (263.net.cn [211.150.96.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D3D743D46 for ; Thu, 27 Jul 2006 09:55:29 +0000 (GMT) (envelope-from mag@intron.ac) Received: from origin.intron.ac (unknown [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id E2C37F1CB8 for ; Thu, 27 Jul 2006 17:55:33 +0800 (CST) X-KSVirus-check: 0 From: "Intron" To: freebsd-emulation@freebsd.org Date: Thu, 27 Jul 2006 17:44:01 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-Id: <1153994127.11460@origin.intron.ac> Cc: alexander@leidinger.net Subject: My Linux AIO Implementation Calling for Test 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: Thu, 27 Jul 2006 09:55:31 -0000 Download: http://ftp.intron.ac/tmp/linux_aio-20060727.tar.bz2 Based on FreeBSD aio(4), my patch set has implemented 5 system calls of Linux Asynchronous Input/Output: io_setup(2), io_destroy(2), io_getevents(2), io_submit(2) and io_cancel(2). It only works with 7.0-CURRENT. I hope in a future day ORACLE 10g for Linux can run on FreeBSD. Please focus you test on: 1. Robustness against invalid calling arguments (especially those for malice attack that would cause security problem or kernel crash). 2. Behavioral similarity to Linux 2.6.17. 3. Efficiency. The ELF binary "testaio" is compiled on Redhat 7.2 with libaio-0.3.105. See "readme.txt" in my package. This is my first kernel code contribution to FreeBSD. I would hear from you for your suggestion. ------------------------------------------------------------------------ From Beijing, China From owner-freebsd-emulation@FreeBSD.ORG Thu Jul 27 12:31:44 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A4DF16A4DF for ; Thu, 27 Jul 2006 12:31:44 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A92843D49 for ; Thu, 27 Jul 2006 12:31:42 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5E606.dip.t-dialin.net [84.165.230.6]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.6/8.13.6) with ESMTP id k6RCJIP5013043 for ; Thu, 27 Jul 2006 14:19:18 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from localhost (localhost [127.0.0.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k6RCVj1j073556 for ; Thu, 27 Jul 2006 14:31:45 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Thu, 27 Jul 2006 14:31:45 +0200 Message-ID: <20060727143145.jnee45txvwosowo8@netchild.homeip.net> X-Priority: 3 (Normal) Date: Thu, 27 Jul 2006 14:31:45 +0200 From: Alexander Leidinger To: freebsd-emulation@freebsd.org References: <200607271229.49495.maxx@bds.ru> In-Reply-To: <200607271229.49495.maxx@bds.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1) / FreeBSD-4.11 X-Virus-Scanned: by amavisd-new Subject: Re: linux-opera does not work after updating linux_base-fc3 to linux_base-fc4 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: Thu, 27 Jul 2006 12:31:44 -0000 Quoting "Maxim P. Kondakov" (from Thu, 27 Jul 2006 12:29:49 +0300): > Good Day, Maintainers. > > I have a problem with linux-opera. > After updating linux_base-fc3 to linux_base-fc4 linux-opera does not start > with the following messages on the screen: > > $ linux-opera > /usr/X11R6/share/linux-opera/bin/opera: /usr/lib/libc.so.6: version > `GLIBC_2.3.4' not found (required by /usr/X11R6/lib/libX11.so.6) I updated the linux_base entry in /usr/ports/UPDATING, please have a look at it and follow the instructions regarding LD_* and perhaps reinstalling the linux_base port. Bye, Alexander. -- Q: How many IBM cpu's does it take to do a logical right shift? A: 33. 1 to hold the bits and 32 to push the register. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-emulation@FreeBSD.ORG Thu Jul 27 17:34:57 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04EB916A4DA; Thu, 27 Jul 2006 17:34:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3972543D46; Thu, 27 Jul 2006 17:34:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6RHYrn3078521; Thu, 27 Jul 2006 13:34:54 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 27 Jul 2006 11:21:16 -0400 User-Agent: KMail/1.9.1 References: <200607221914.15826.lofi@freebsd.org> <200607250358.21457.tijl@ulyssis.org> In-Reply-To: <200607250358.21457.tijl@ulyssis.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607271121.17313.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Thu, 27 Jul 2006 13:34:55 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1623/Wed Jul 26 18:35:11 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Daniel Eischen , freebsd-emulation@freebsd.org, Michael Nottebrock Subject: Re: WINE vs. FreeBSD 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: Thu, 27 Jul 2006 17:34:57 -0000 On Monday 24 July 2006 21:58, Tijl Coosemans wrote: > On Monday 24 July 2006 18:49, Daniel Eischen wrote: > > On Mon, 24 Jul 2006, Tijl Coosemans wrote: > > > On Monday 24 July 2006 17:39, Daniel Eischen wrote: > > >> On Mon, 24 Jul 2006, Tijl Coosemans wrote: > > >>> I've attached two patches that accomplish this, but this seems to > > >>> trigger other problems, so use at your own risk. If you want to > > >>> try them, place them in the port's files/ directory and add a > > >>> line containing "USE_AUTOTOOLS= autoconf:259" to the Makefile. > > >>> This seems to break wine+libpthread, so I've also changed the > > >>> port to use libthr instead. > > >>> > > >>> For the libpthread experts, I haven't investigated that much > > >>> further yet, but libpthread seems to fail in create_stack() from > > >>> _pthread_create() from _thr_start_sig_daemon(). > > >> > > >> See my response to this in a previous reply to this thread. > > >> libthr and libpthread use LDT's for TLS. WINE is stomping on them > > >> because it doesn't properly create LDTs. This is not a problem > > >> with either of the thread libraries and this issue has been known > > >> ever since we implemented TLS years ago. > > > > > > And as I stated later on in that thread, I don't see where > > > libpthread and libthr still use LDT entries. As far as I understand > > > the code, instead of using an LDT entry per thread (as it sure used > > > to be), only one single GDT entry is used whose base address is > > > updated during a context switch. Looking at the cvs history, it has > > > been working like this since a couple commits of Peter Wemm about a > > > year ago. > > > > > > And if nothing but Wine uses the LDT, Wine's static allocation of > > > LDT entries can't be the problem. > > > > Look, we use %gs for TLS, period. Go see > > libpthread/arch/i386/i386/pthread_md.c for how libpthread does it. > > TLS would not work without setting aside a register for the threads > > library (and rtld) to use. > > Aaarrrrgghhh :) > > What you say is true of course, but %gs points to a GDT entry, not LDT. > libpthread and libthr no longer use LDT entries... > > There would be a problem of course if Wine or Windows programs > change %gs. Wine does seem to touch %gs but I've never actually seen it > change. It's always 0x001B, which is the correct value (GUGS_SEL). > > However, Wine/Windows uses %fs for TLS and it appears that the FreeBSD > kernel doesn't preserve it. It always ends up pointing to GUDATA_SEL. The kernel should preserve %fs across syscalls, traps, and faults. Can you point to a specific case where %fs is not preserved? It sounds like %fs is never set to a value in Wine. -- John Baldwin From owner-freebsd-emulation@FreeBSD.ORG Thu Jul 27 21:08:42 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB71516A4DD; Thu, 27 Jul 2006 21:08:42 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from outmx009.isp.belgacom.be (outmx009.isp.belgacom.be [195.238.5.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 565EB43D49; Thu, 27 Jul 2006 21:08:41 +0000 (GMT) (envelope-from tijl@ulyssis.org) Received: from outmx009.isp.belgacom.be (localhost [127.0.0.1]) by outmx009.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k6RL8cUt029585; Thu, 27 Jul 2006 23:08:39 +0200 (envelope-from ) Received: from kalimero.kotnet.org (84.41-245-81.adsl-dyn.isp.belgacom.be [81.245.41.84]) by outmx009.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k6RL8SQf029502; Thu, 27 Jul 2006 23:08:28 +0200 (envelope-from ) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.13.6/8.13.6) with ESMTP id k6RL8RQ3004931; Thu, 27 Jul 2006 23:08:28 +0200 (CEST) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-emulation@freebsd.org Date: Thu, 27 Jul 2006 23:08:22 +0200 User-Agent: KMail/1.9.3 References: <200607221914.15826.lofi@freebsd.org> <200607250358.21457.tijl@ulyssis.org> <200607271121.17313.jhb@freebsd.org> In-Reply-To: <200607271121.17313.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2050574.CxlVPIfA9y"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200607272308.27425.tijl@ulyssis.org> Cc: Daniel Eischen , freebsd-hackers@freebsd.org, Michael Nottebrock , John Baldwin Subject: Re: WINE vs. FreeBSD 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: Thu, 27 Jul 2006 21:08:42 -0000 --nextPart2050574.CxlVPIfA9y Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 27 July 2006 17:21, John Baldwin wrote: > On Monday 24 July 2006 21:58, Tijl Coosemans wrote: > > However, Wine/Windows uses %fs for TLS and it appears that the > > FreeBSD kernel doesn't preserve it. It always ends up pointing to > > GUDATA_SEL. > > The kernel should preserve %fs across syscalls, traps, and faults.=20 > Can you point to a specific case where %fs is not preserved? It > sounds like %fs is never set to a value in Wine. Yes, it was a combination of compiler optimizations and an inline=20 assembly block missing __volatile__. --nextPart2050574.CxlVPIfA9y Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQBEyStLdMR2xnarec8RAqZ7AJ9GAvaccJ2AOXet7rLSJHpSLSzolwCfUrMf 4KQ0DZCCpmV+5bxq6uXCv4M= =Ndp6 -----END PGP SIGNATURE----- --nextPart2050574.CxlVPIfA9y-- From owner-freebsd-emulation@FreeBSD.ORG Thu Jul 27 21:53:33 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B52916A4E5; Thu, 27 Jul 2006 21:53:33 +0000 (UTC) (envelope-from prvs=julian=356e8a28d@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BD8943D77; Thu, 27 Jul 2006 21:53:29 +0000 (GMT) (envelope-from prvs=julian=356e8a28d@elischer.org) Received: from unknown (HELO [192.168.2.4]) ([10.251.60.53]) by a50.ironport.com with ESMTP; 27 Jul 2006 14:53:30 -0700 Message-ID: <44C935D9.8040604@elischer.org> Date: Thu, 27 Jul 2006 14:53:29 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tijl Coosemans References: <200607221914.15826.lofi@freebsd.org> <200607250358.21457.tijl@ulyssis.org> <200607271121.17313.jhb@freebsd.org> <200607272308.27425.tijl@ulyssis.org> In-Reply-To: <200607272308.27425.tijl@ulyssis.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Daniel Eischen , freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org, Michael Nottebrock Subject: Re: WINE vs. FreeBSD 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: Thu, 27 Jul 2006 21:53:33 -0000 Tijl Coosemans wrote: >On Thursday 27 July 2006 17:21, John Baldwin wrote: > > >>On Monday 24 July 2006 21:58, Tijl Coosemans wrote: >> >> >>>However, Wine/Windows uses %fs for TLS and it appears that the >>>FreeBSD kernel doesn't preserve it. It always ends up pointing to >>>GUDATA_SEL. >>> >>> >>The kernel should preserve %fs across syscalls, traps, and faults. >>Can you point to a specific case where %fs is not preserved? It >>sounds like %fs is never set to a value in Wine. >> >> > >Yes, it was a combination of compiler optimizations and an inline >assembly block missing __volatile__. > > > does this mean that wine will work from now on? i.e. is the fix being fed back into wine sources? From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 28 01:06:59 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB62716A4DD; Fri, 28 Jul 2006 01:06:59 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from outmx013.isp.belgacom.be (outmx013.isp.belgacom.be [195.238.5.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 286A943D4C; Fri, 28 Jul 2006 01:06:59 +0000 (GMT) (envelope-from tijl@ulyssis.org) Received: from outmx013.isp.belgacom.be (localhost [127.0.0.1]) by outmx013.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k6S16ug8013028; Fri, 28 Jul 2006 03:06:56 +0200 (envelope-from ) Received: from kalimero.kotnet.org (84.41-245-81.adsl-dyn.isp.belgacom.be [81.245.41.84]) by outmx013.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with ESMTP id k6S16lPq012969; Fri, 28 Jul 2006 03:06:47 +0200 (envelope-from ) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.13.6/8.13.6) with ESMTP id k6S16kkM010006; Fri, 28 Jul 2006 03:06:47 +0200 (CEST) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-emulation@freebsd.org Date: Fri, 28 Jul 2006 03:06:37 +0200 User-Agent: KMail/1.9.3 References: <200607221914.15826.lofi@freebsd.org> <200607272308.27425.tijl@ulyssis.org> <44C935D9.8040604@elischer.org> In-Reply-To: <44C935D9.8040604@elischer.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3629864.ZBnRPTWIvW"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200607280306.46465.tijl@ulyssis.org> Cc: freebsd-hackers@freebsd.org, Julian Elischer , Michael Nottebrock Subject: Re: WINE vs. FreeBSD 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: Fri, 28 Jul 2006 01:07:00 -0000 --nextPart3629864.ZBnRPTWIvW Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 27 July 2006 23:53, Julian Elischer wrote: > Tijl Coosemans wrote: > > On Thursday 27 July 2006 17:21, John Baldwin wrote: > > > The kernel should preserve %fs across syscalls, traps, and faults. > > > Can you point to a specific case where %fs is not preserved? It > > > sounds like %fs is never set to a value in Wine. > > > > Yes, it was a combination of compiler optimizations and an inline > > assembly block missing __volatile__. > > does this mean that wine will work from now on? > i.e. is the fix being fed back into wine sources? Not yet. Windows9x mode should work again as well as threading and TLS,=20 but there are still some open issues, mainly with exception handling=20 and file access. Exception handling was completely broken and is now=20 mostly working, but sometimes gets stuck in a loop generating=20 exceptions and eventually overflowing the stack. I'll submit patches once Wine passes the most important unit tests,=20 unless someone already wants to have a look at them of course... --nextPart3629864.ZBnRPTWIvW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQBEyWMmdMR2xnarec8RAstSAKClCUO26Y5RNdF5RHf2KCdiUhTMEQCgqrWy wsUBBZw08BZ1m99CKsZ8y+4= =wMov -----END PGP SIGNATURE----- --nextPart3629864.ZBnRPTWIvW-- From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 28 09:36:58 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5891D16A4DA for ; Fri, 28 Jul 2006 09:36:58 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89CFB43D45 for ; Fri, 28 Jul 2006 09:36:56 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k6S9aoQO032495 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 28 Jul 2006 11:36:50 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k6S9alGq032494; Fri, 28 Jul 2006 11:36:47 +0200 (CEST) Date: Fri, 28 Jul 2006 11:36:47 +0200 From: Divacky Roman To: Intron Message-ID: <20060728093647.GA32168@stud.fit.vutbr.cz> References: <1153994127.11460@origin.intron.ac> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1153994127.11460@origin.intron.ac> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: alexander@leidinger.net, freebsd-emulation@freebsd.org Subject: Re: My Linux AIO Implementation Calling for Test 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: Fri, 28 Jul 2006 09:36:58 -0000 On Thu, Jul 27, 2006 at 05:44:01PM +0800, Intron wrote: > Download: http://ftp.intron.ac/tmp/linux_aio-20060727.tar.bz2 > > Based on FreeBSD aio(4), my patch set has implemented 5 system calls > of Linux Asynchronous Input/Output: io_setup(2), io_destroy(2), > io_getevents(2), io_submit(2) and io_cancel(2). It only works with > 7.0-CURRENT. havent studied details but here are my suggestions: 1) please conform to style(9) 2) please use LMSG, ARGS macros to be conform with the rest of the linuxolator 3) why do you use uma directly? linuxolator uses malloc from within M_LINUX. I personally dont mind using uma zone directly but if there is a reason for it. thnx for your contribution! roman From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 28 15:38:47 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C39D016A501 for ; Fri, 28 Jul 2006 15:38:47 +0000 (UTC) (envelope-from mag@intron.ac) Received: from smtp.263.net (263.net.cn [211.150.96.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5589B43D4C for ; Fri, 28 Jul 2006 15:38:44 +0000 (GMT) (envelope-from mag@intron.ac) Received: from origin.intron.ac (unknown [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 592BDF17BC for ; Fri, 28 Jul 2006 23:38:51 +0800 (CST) X-KSVirus-check: 0 References: <1153994127.11460@origin.intron.ac> <20060728093647.GA32168@stud.fit.vutbr.cz> In-Reply-To: <20060728093647.GA32168@stud.fit.vutbr.cz> From: "Intron" To: Divacky Roman Date: Fri, 28 Jul 2006 23:35:02 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-Id: <1154101122.39118@origin.intron.ac> Cc: alexander@leidinger.net, freebsd-emulation@freebsd.org Subject: Re: My Linux AIO Implementation Calling for Test 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: Fri, 28 Jul 2006 15:38:47 -0000 Divacky Roman wrote: > On Thu, Jul 27, 2006 at 05:44:01PM +0800, Intron wrote: >> Download: http://ftp.intron.ac/tmp/linux_aio-20060727.tar.bz2 >> >> Based on FreeBSD aio(4), my patch set has implemented 5 system calls >> of Linux Asynchronous Input/Output: io_setup(2), io_destroy(2), >> io_getevents(2), io_submit(2) and io_cancel(2). It only works with >> 7.0-CURRENT. > > havent studied details but here are my suggestions: > > 1) please conform to style(9) Do you refer to "if" directive and line width? I will obey style(9) as possible, keeping most of legibility. > > 2) please use LMSG, ARGS macros to be conform with the rest of the linuxolator I will. > > 3) why do you use uma directly? linuxolator uses malloc from within M_LINUX. I > personally dont mind using uma zone directly but if there is a reason for it. The function set zone(9) is good at managing (allocating/freeing) small memory block frequently. It obtains big memory block from VM in batches and re-allocate small memory block (e.g. structure/union of C) to caller. When it re-allocates small memory block frequently, in contrast VM page mapping table (i.e. GDT and LDT on x86 and x86_64) will NOT be frequently modified, which can relax VM. My code manages many C structures (Linux AIO context and Linux AIO request). So I believe zone(9) is more fit for my code than malloc(9). If you have different opinion, I will respect you. > > thnx for your contribution! > > roman ------------------------------------------------------------------------ From Beijing, China From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 28 17:36:13 2006 Return-Path: X-Original-To: freebsd-emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD7D316A4E2; Fri, 28 Jul 2006 17:36:13 +0000 (UTC) (envelope-from qemu-l@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5FA543D60; Fri, 28 Jul 2006 17:36:08 +0000 (GMT) (envelope-from qemu-l@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn [127.0.0.1]) by gwyn.kn-bremen.de (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k6SHa6VP002093 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 28 Jul 2006 19:36:06 +0200 Received: from saturn.kn-bremen.de (uucp@localhost) by gwyn.kn-bremen.de (8.13.4/8.13.4/Submit) with UUCP id k6SHa6QC002091; Fri, 28 Jul 2006 19:36:06 +0200 Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.13.6/8.13.6) with ESMTP id k6SHXqul007270; Fri, 28 Jul 2006 19:33:52 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.13.6/8.13.6/Submit) id k6SHXp3F007269; Fri, 28 Jul 2006 19:33:51 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Fri, 28 Jul 2006 19:33:51 +0200 To: Jung-uk Kim Message-ID: <20060728173351.GA6314@saturn.kn-bremen.de> Mail-Followup-To: Jung-uk Kim , freebsd-emulation@FreeBSD.org, freebsd-usb@FreeBSD.org, qemu-devel@nongnu.org References: <20060723224041.GA20196@saturn.kn-bremen.de> <20060725174719.GA16116@saturn.kn-bremen.de> <200607251906.10687.jkim@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200607251906.10687.jkim@FreeBSD.org> User-Agent: Mutt/1.5.11 Cc: freebsd-emulation@FreeBSD.org, qemu-devel@nongnu.org, freebsd-usb@FreeBSD.org Subject: Re: FreeBSD qemu 0.8.2 update - please test! (and usb cardreader SET_ADDR_FAILED) 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: Fri, 28 Jul 2006 17:36:14 -0000 On Tue, Jul 25, 2006 at 07:06:02PM -0400, Jung-uk Kim wrote: > On Tuesday 25 July 2006 01:47 pm, Juergen Lock wrote: > > @@ -47,21 +43,20 @@ > > void set_float_rounding_mode(int val STATUS_PARAM) > > { > > STATUS(float_rounding_mode) = val; > > --#if defined(_BSD) && !defined(__APPLE__) > > -+#if defined(_BSD) && !defined(__APPLE__) && \ > > -+ (defined(__FreeBSD__) && __FreeBSD_version < 500000) > > +-#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) > > ++#if (defined(_BSD) && (defined(__FreeBSD__) && __FreeBSD_version < 500000)) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) > > fpsetround(val); > > #elif defined(__arm__) > > /* nothing to do */ > > FYI, a parenthesis is misplaced (Note: I just rearranged > the order to be more clearer): > > +-#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) > ++#if (defined(_BSD) && !defined(__APPLE__) && (defined(__FreeBSD__) && __FreeBSD_version < 500000)) || \ > ++ (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) Well this should actually be: #if defined(_BSD) && !defined(__APPLE__) && !defined(__FreeBSD__) || \ (defined(__FreeBSD__) && __FreeBSD_version < 500000) || \ (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) if it ever was going to be merged back. (wrongly excluded non-FreeBSD BSDs) > > Actually it is an upstream bug, though. Nah, the parens there are okay... (|| binds less than &&, i.e. 1 || 0 && 0 evaluates to 1.) On another note, am i the only one seeing those -kernel-kqemu problems? thanx, Juergen From owner-freebsd-emulation@FreeBSD.ORG Sat Jul 29 10:09:05 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6CC516A4E1 for ; Sat, 29 Jul 2006 10:09:05 +0000 (UTC) (envelope-from mag@intron.ac) Received: from mail.oreilly.com.cn (oreilly.com.cn [211.154.219.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id A306443D46 for ; Sat, 29 Jul 2006 10:09:04 +0000 (GMT) (envelope-from mag@intron.ac) Received: from origin.intron.ac ([210.51.165.237]) (AUTH: LOGIN intron) by mail.oreilly.com.cn with esmtp; Sat, 29 Jul 2006 18:08:58 +0800 id 000C9458.44CB33BD.000027D9 References: <1153994127.11460@origin.intron.ac> <20060728093647.GA32168@stud.fit.vutbr.cz> In-Reply-To: <20060728093647.GA32168@stud.fit.vutbr.cz> From: "Intron" To: Divacky Roman Date: Sat, 29 Jul 2006 18:05:47 +0800 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312"; format=flowed Content-Transfer-Encoding: 7bit Message-Id: <1154167741.55639@origin.intron.ac> Cc: alexander@leidinger.net, freebsd-emulation@freebsd.org Subject: [Updated on 2006-07-29] Re: My Linux AIO Implementation Calling for Test 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: Sat, 29 Jul 2006 10:09:05 -0000 Download: http://ftp.intron.ac/tmp/linux_aio-20060729.tar.bz2 1. Use LMSG(). 2. I wonder whether ARGS() is handy enough. Instead, the keyword __func__ instituted by ISO C99 should be used. See my DARGPRINTF(). 3. Some modifications for style(9). ------------------------------------------------------------------------ From Beijing, China Divacky Roman wrote: > On Thu, Jul 27, 2006 at 05:44:01PM +0800, Intron wrote: >> Download: http://ftp.intron.ac/tmp/linux_aio-20060727.tar.bz2 >> >> Based on FreeBSD aio(4), my patch set has implemented 5 system calls >> of Linux Asynchronous Input/Output: io_setup(2), io_destroy(2), >> io_getevents(2), io_submit(2) and io_cancel(2). It only works with >> 7.0-CURRENT. > > havent studied details but here are my suggestions: > > 1) please conform to style(9) > > 2) please use LMSG, ARGS macros to be conform with the rest of the linuxolator > > 3) why do you use uma directly? linuxolator uses malloc from within M_LINUX. I > personally dont mind using uma zone directly but if there is a reason for it. > > thnx for your contribution! > > roman