From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I1FjT-0001Kv-3s for qemu-devel@nongnu.org; Thu, 21 Jun 2007 02:01:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I1FjS-0001KZ-MZ for qemu-devel@nongnu.org; Thu, 21 Jun 2007 02:01:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I1FjS-0001KW-Gv for qemu-devel@nongnu.org; Thu, 21 Jun 2007 02:01:26 -0400 Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I1FjR-00045Y-Va for qemu-devel@nongnu.org; Thu, 21 Jun 2007 02:01:26 -0400 Date: Thu, 21 Jun 2007 02:01:21 -0400 From: Jakub Jelinek Subject: Re: [Qemu-devel] [PATCH] Fix TLS support on x86 Message-ID: <20070621060120.GO4033@devserv.devel.redhat.com> References: <46696500.5020406@suse.de> <20070618192139.GK19155@networkno.de> <467958F6.2070804@suse.de> <1182403868.2782.16.camel@shinybook.infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1182403868.2782.16.camel@shinybook.infradead.org> Reply-To: Jakub Jelinek , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Woodhouse Cc: qemu-devel@nongnu.org On Thu, Jun 21, 2007 at 01:31:07PM +0800, David Woodhouse wrote: > On Wed, 2007-06-20 at 18:42 +0200, Alexander Graf wrote: > > implements futexes (this is mostly done by David Woodhouse as well, > > FUTEX_WAKE_OP done by me) > > #ifdef BSWAP_NEEDED, only FUTEX_OP_CMP_EQ and FUTEX_OP_CMP_NE will work > as expected. If we want to do the rest then we'll need to implement > FUTEX_OP_CMP_LT_WRONGENDIAN &c in the kernel. > > Or maybe, since we don't do set_robust_list (and would need wrong-endian > support in the kernel for that too), we can assume that it's all > in-process, and hence all _within_ qemu, and we could actually implement > the futex stuff entirely within qemu with qemu's own locking? > > For now I think the safer option is just to leave FUTEX_WAKE_OP > unimplemented. Jakub, what do you think? FUTEX_WAKE_OP is just an optimization and the only op glibc uses is FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, so something that would need kernel help. But all glibcs so far if syscall (SYS_futex, ... FUTEX_WAKE_OP, ...) fails just fall back to syscall (SYS_futex, ... FUTEX_WAKE, ...) + unlock. So I think it is safe to leave FUTEX_WAKE_OP not supported for BSWAP_NEEDED. Jakub