From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1xVp-0000rt-8O for qemu-devel@nongnu.org; Thu, 26 Nov 2015 09:27:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1xVk-0004rg-9D for qemu-devel@nongnu.org; Thu, 26 Nov 2015 09:27:05 -0500 Received: from mail.sysgo.com ([176.9.12.79]:50762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1xVk-0004rL-3e for qemu-devel@nongnu.org; Thu, 26 Nov 2015 09:27:00 -0500 References: <565485A0.5090902@sysgo.com> <5654883F.9050509@redhat.com> <56557AA2.9080100@sysgo.com> <5655AA1F.8060906@sysgo.com> <5655B706.6060306@redhat.com> <5655BFEA.50407@sysgo.com> <5655C781.8090201@redhat.com> <5655D848.9050104@sysgo.com> <5655DEE2.20700@redhat.com> <5656CCE3.2050504@sysgo.com> <5656EC15.1010909@weilnetz.de> From: David Engraf Message-ID: <565716B1.9060301@sysgo.com> Date: Thu, 26 Nov 2015 15:26:57 +0100 MIME-Version: 1.0 In-Reply-To: <5656EC15.1010909@weilnetz.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] qemu_mutex_iothread_locked not correctly synchronized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil , Paolo Bonzini , qemu-devel@nongnu.org Cc: Fam Zheng Am 26.11.2015 um 12:25 schrieb Stefan Weil: > Am 26.11.2015 um 10:12 schrieb David Engraf: >> Am 25.11.2015 um 17:16 schrieb Paolo Bonzini: >>> >>> >>> On 25/11/2015 16:48, David Engraf wrote: >>>> >>>> Indeed, TLS handling is broken. The address of iothread_locked is >>>> always >>>> the same between threads and I can see that a different thread sets >>>> iothread_locked to false, thus my current thread uses an invalid state. >>>> I will have to check why my compiler produces invalid TLS code. >>> >>> That rings a bell, I think there are different CRT libraries or >>> something like that. Stefan, what would break TLS under Windows? >> >> "--extra-cflags=-mthreads" is the solution. iothread_locked is unique >> for each thread now. I saw that this is already mentioned in the >> Documentation [1], but why isn't that enabled by default if QEMU >> requires this option on Windows? Without this option, even the latest >> version of gcc doesn't produce working TLS code. >> >> Many thanks for your support! >> >> David >> >> [1] http://wiki.qemu.org/Hosts/W32 > > Hi David, > > I just prepared a patch which will enable that option by default > for all compilations targeting Windows. > > Thanks for your report! Thank you. David