From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TK7FT-0007pL-1V for qemu-devel@nongnu.org; Fri, 05 Oct 2012 08:43:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TK7FN-0006fH-9f for qemu-devel@nongnu.org; Fri, 05 Oct 2012 08:43:22 -0400 Received: from david.siemens.de ([192.35.17.14]:28670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TK7FM-0006eJ-W8 for qemu-devel@nongnu.org; Fri, 05 Oct 2012 08:43:17 -0400 Message-ID: <506ED5DF.9030007@siemens.com> Date: Fri, 05 Oct 2012 14:43:11 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1349388419-21924-1-git-send-email-lmr@redhat.com> <1349388419-21924-2-git-send-email-lmr@redhat.com> <506E8C53.5050107@redhat.com> <87ehldccsj.fsf@codemonkey.ws> In-Reply-To: <87ehldccsj.fsf@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] debugexit: support for custom exit port (LGPL VGA BIOS port 0x501) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Lucas Meneghel Rodrigues , Paolo Bonzini , =?ISO-8859-1?Q?Herv=E9_Poussineau?= , qemu-devel [was a private thread due to typo in qemu list address] On 2012-10-05 14:40, Anthony Liguori wrote: > Paolo Bonzini writes: > >> Il 05/10/2012 00:06, Lucas Meneghel Rodrigues ha scritto: >>> +static void debugexit_ioport_write(void *opaque, uint32_t addr, uint32_t val) >>> +{ >>> + exit((val << 1) | 1); >>> +} >>> + >> >> This "| 1" might be the problem. Anthony, are you relying on it in >> qemu-test and/or can you work out the changes if we use just >> "exit(val)"? > > The reason for ' | 1' was to make sure that the guest couldn't trigger > an exit(0). > > If there's a compelling reason to drop '| 1', I can adjust my tests > accordingly. assert(val); (or hw_error) exit(val); I would suggest. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux