From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TK8oQ-0002el-21 for qemu-devel@nongnu.org; Fri, 05 Oct 2012 10:23:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TK8oJ-0006uO-39 for qemu-devel@nongnu.org; Fri, 05 Oct 2012 10:23:33 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:32986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TK8oI-0006u0-V7 for qemu-devel@nongnu.org; Fri, 05 Oct 2012 10:23:27 -0400 Received: by mail-ob0-f173.google.com with SMTP id wc18so1624497obb.4 for ; Fri, 05 Oct 2012 07:23:26 -0700 (PDT) From: Anthony Liguori In-Reply-To: <506EEB96.2070706@redhat.com> 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> <506ED5DF.9030007@siemens.com> <506ED6B8.9020306@redhat.com> <87ehld6mw2.fsf@codemonkey.ws> <506EEB96.2070706@redhat.com> Date: Fri, 05 Oct 2012 09:23:22 -0500 Message-ID: <87mx01gfqd.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Paolo Bonzini Cc: Lucas Meneghel Rodrigues , Jan Kiszka , =?utf-8?Q?Herv=C3=A9?= Poussineau , qemu-devel Paolo Bonzini writes: > Il 05/10/2012 15:58, Anthony Liguori ha scritto: >> Paolo Bonzini writes: >> >>> Il 05/10/2012 14:43, Jan Kiszka ha scritto: >>>>>>>> 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. >>> >>> I think what the kvm_unittests want is exactly to trigger an exit(0). >>> Why did you rule it out? >> >> Mainly to differientiate between an open coded exit(0)/exit(1) and >> something triggered by the unit test. >> >> The problem I tried to cope with was: >> >> anthony@titi:~/git/qemu$ grep 'exit([01])' hw/*.c | wc -l >> 249 > > Understood. The right solution is of course to fix hw/*.c. I don't think it's an awful thing for test harnesses to just use a reserved range of exit reasons. Should be easy enough to change kvm-unittests, no? Regards, Anthony Liguori > > Let's start with exit(0). > > hw/eeprom93xx.c: exit(0); <--- should be hw_error > hw/pci.c: exit(0); <--- move to qemu_show_nic_models > hw/spapr.c: exit(0); <--- should be exit(1) !! > > For exit(1), many of them should become hw_error, especially those in > this files: > > hw/bonito.c > hw/ivshmem.c > hw/lsi53c895a.c > hw/pci.c > hw/pl022.c > hw/pl061.c > hw/pl110.c > hw/qxl.c > hw/smbus.c > hw/ssd0303.c > hw/ssi-sd.c > hw/stellaris_enet.c > hw/virtio-blk.c > hw/virtio.c > hw/virtio-net.c > hw/virtio-scsi.c > > Any takers? > > Paolo