From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6JC4-0002v1-2u for qemu-devel@nongnu.org; Tue, 08 Dec 2015 09:24:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6JBz-0002Ps-5k for qemu-devel@nongnu.org; Tue, 08 Dec 2015 09:24:40 -0500 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:44673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6JBy-0002Pm-Tj for qemu-devel@nongnu.org; Tue, 08 Dec 2015 09:24:35 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 8 Dec 2015 14:24:33 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id CD98C219004D for ; Tue, 8 Dec 2015 14:24:22 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tB8EOUmS6947186 for ; Tue, 8 Dec 2015 14:24:30 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tB8EOTpR024079 for ; Tue, 8 Dec 2015 07:24:30 -0700 References: <1449118802-12047-1-git-send-email-stefanha@redhat.com> <1449118802-12047-3-git-send-email-stefanha@redhat.com> <20151207110251.6391b306.cornelia.huck@de.ibm.com> <20151207174229.4edc6004.cornelia.huck@de.ibm.com> <20151208095954.GD5071@noname.str.redhat.com> <20151208130008.5d0fc318.cornelia.huck@de.ibm.com> <5666CD48.4050600@de.ibm.com> <5666DB13.7020501@de.ibm.com> <20151208134522.GE5071@noname.str.redhat.com> <5666E1F1.5030903@de.ibm.com> <20151208141021.GF5071@noname.str.redhat.com> From: Christian Borntraeger Message-ID: <5666E81D.7070507@de.ibm.com> Date: Tue, 8 Dec 2015 15:24:29 +0100 MIME-Version: 1.0 In-Reply-To: <20151208141021.GF5071@noname.str.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL for-2.5 2/4] block: Don't wait serialising for non-COR read requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Cornelia Huck , Peter Maydell , Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi On 12/08/2015 03:10 PM, Kevin Wolf wrote: [...] >>>> Not a compiler bug. gcc uses a floating point register 8 to spill >>>> the pointer of blk (which is call saved) submit_request will later >>>> on call qemu_coroutine_enter and after returning from >>>> qemu_coroutine_enter, the fpr8 contains junk. Not sure yet, what happened. >>> >>> Coroutines don't save the FPU state, so you're not supposed to use >>> floating point operations inside coroutines. That the compiler spills >>> some integer value into a floating point register is a bit nasty... >> >> Just checked. bdrv_aligned_preadv does also use fprs (also for filling >> and spilling). Some versions of gcc seem to like that as the LDGR and LGDR >> instructions are pretty cheap and move the content from/to fprs in a bitwise >> fashion. So this coroutine DOES trash floating point registers. >> >> Without the patch gcc seems to be fine with the 16 gprs and does not >> spilling/filling from/to fprs in bdrv_aligned_preadv. > > Actually, on closer look it seems that the reason why there is no code > for saving the floating point registers in setjmp() on x86 is that they > are caller-save registers anyway, so it doesn't have to. Otherwise the > internet seems to be of the opinion that longjmp() must indeed restore > floating point registers. > > So this might be a libc bug on s390 then. Fixed with https://sourceware.org/ml/libc-alpha/2013-01/msg00853.html Christian