From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr1eh-0006YU-Fn for qemu-devel@nongnu.org; Wed, 19 Nov 2014 04:34:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xr1eb-0005hh-C3 for qemu-devel@nongnu.org; Wed, 19 Nov 2014 04:34:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr1eb-0005hS-2i for qemu-devel@nongnu.org; Wed, 19 Nov 2014 04:34:25 -0500 Message-ID: <546C6416.8080104@redhat.com> Date: Wed, 19 Nov 2014 10:34:14 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1416340889-4991-1-git-send-email-ilg@livius.net> <546BB7F8.1050800@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] Pass semihosting exit code back to system. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Liviu Ionescu , QEMU Developers On 18/11/2014 23:50, Peter Maydell wrote: > On 18 November 2014 21:19, Paolo Bonzini wrote: >> The isa-debugexit and testdev character device do not exit with exitcode >> 0, in order to distinguish an exit from a system power down; the >> low-order bit is always 1. The return values then should be 1 and 3 >> instead of 0 and 1. > > Semihosting isn't a test device -- it's an implementation of an > ABI (mostly intended for almost-but-not-quite-bare-metal programs). > I'm pretty sure that exiting anything except 0 on a successful > exit request by the guest will break usage of QEMU in scenarios > like the gcc test suite. Thanks! (FWIW, I don't find the behavior of those devices very useful either... just mentioning them for the sake of consistency). Paolo