From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJOPX-0002n8-9t for qemu-devel@nongnu.org; Fri, 28 Feb 2014 09:27:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJOPS-0002Pv-3l for qemu-devel@nongnu.org; Fri, 28 Feb 2014 09:27:35 -0500 Received: from cantor2.suse.de ([195.135.220.15]:52264 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJOPR-0002O4-Tk for qemu-devel@nongnu.org; Fri, 28 Feb 2014 09:27:30 -0500 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) From: Alexander Graf In-Reply-To: Date: Fri, 28 Feb 2014 22:27:19 +0800 Content-Transfer-Encoding: quoted-printable Message-Id: <4B6FA9D8-356D-47D1-A270-C71A1216B305@suse.de> References: <87sirhyi1b.fsf@linaro.org> <87txbnfuw1.fsf@linaro.org> <530C5925.8060608@suse.de> <87ppm7fhsb.fsf@linaro.org> Subject: Re: [Qemu-devel] Call for testing QEMU aarch64-linux-user emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: linaro-dev , Dann Frazier , Michael Matz , qemu-devel , "linaro-toolchain@lists.linaro.org" , Wook Wookey , =?utf-8?Q?Alex_Benn=C3=A9e?= , =?utf-8?Q?Andreas_F=C3=A4rber?= , Christoffer Dall > Am 28.02.2014 um 22:21 schrieb Peter Maydell : >=20 >> On 28 February 2014 14:12, Alex Benn=C3=A9e wrot= e: >> Is this "simply" a case of having a precise state in/around syscalls? >=20 > No. >=20 >> AIUI we already have such a mechanism for dealing with faults in >> translated code so this is all aimed at when an asynchronous signal >> arrives somewhere in QEMU's own code. >=20 > The major problem is that system calls are supposed to be > atomic wrt signals, ie for the guest we must appear to > either take the signal first, or have the syscall return > EINTR, or take it after. Further, we mustn't make a host > syscall that is supposed to be interrupted by a signal if > the signal has already arrived, because we'll hang. >=20 > http://lists.gnu.org/archive/html/qemu-devel/2011-12/msg00384.html > has a fuller description of the problem, though note that > my analysis of the solution is incorrect. I think Michael's > right that we could deal with this if we had known native > asm for the syscall sequence. (We probably want to separate > out the interruptible syscalls so we can continue to use > straightforward "just call libc" code for the bulk of them > which are non-interruptible.) Could we check the instruction at the sognaling pc and check if it's a known= syscall instruction? No need to replace glibc wrappers then. Alex >=20 > thanks > -- PMM