From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:41910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyGOu-0002jk-Az for qemu-devel@nongnu.org; Mon, 25 Feb 2019 08:34:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyGOs-0007l0-U7 for qemu-devel@nongnu.org; Mon, 25 Feb 2019 08:34:32 -0500 Received: from mx1.tetrasec.net ([74.117.190.25]:39924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyGOs-0007j5-KJ for qemu-devel@nongnu.org; Mon, 25 Feb 2019 08:34:30 -0500 Date: Mon, 25 Feb 2019 14:25:17 +0100 From: Natanael Copa Message-ID: <20190225142517.24367cad@ncopa-desktop.copa.dup.pw> In-Reply-To: References: <28e6b4ed-9afd-3a79-6267-86c7385c23ce@redhat.com> <20190223165523.1d674224@ncopa-desktop.copa.dup.pw> <20190225112424.2dd535a1@ncopa-desktop.copa.dup.pw> <20190225132156.477faf18@ncopa-desktop.copa.dup.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-block] Guest unresponsive after Virtqueue size exceeded error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Stefan Hajnoczi , Paolo Bonzini , Fernando Casas =?ISO-8859-1?B?U2No9nNzb3c=?= , qemu-devel , Richard Henderson On Mon, 25 Feb 2019 13:06:16 +0000 Peter Maydell wrote: > On Mon, 25 Feb 2019 at 12:22, Natanael Copa wrote: > > > > On Mon, 25 Feb 2019 10:34:23 +0000 > > Peter Maydell wrote: > > > The short term fix is to fix your toolchain/compilation > > > environment options so that it isn't trying to override > > > the definition of memcpy(). > > > > The easiest workaround is to simply disable FORTIY_SOURCE, but that > > will weaken the security for all implemented string functions, strcpy, > > memmove etc, so I don't want to do that. > > > > Is it only lduw_he_p that needs to be atomic or are the other functions > > in include/qemu/bswap.h using memcpy also required to be atomic? > > Hard to say, since we haven't done the "audit all the callers" > step that Stefan mentioned. If you're going to replace memcpy > with __builtin_memcpy then the safest thing is to do it for > all those uses (this will also give you much better generated > code for performance purposes). I figured that and that is exactly what I did. Fernando: Can you please test the binary from qemu-system-x86_64-3.1.0-r3 from alpine edge? I will backport the fix if you can confirm it fixes the problem. Thanks! -nc PS. Those issues are pretty hard to track down, so big thanks to everyone who helped find the exact issue here. You have done a great work!