From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDy1I-0002xr-Gk for qemu-devel@nongnu.org; Thu, 13 Feb 2014 10:16:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDy19-0003YM-Sm for qemu-devel@nongnu.org; Thu, 13 Feb 2014 10:16:08 -0500 Received: from mail-qg0-x22b.google.com ([2607:f8b0:400d:c04::22b]:44613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDy19-0003YG-H0 for qemu-devel@nongnu.org; Thu, 13 Feb 2014 10:15:59 -0500 Received: by mail-qg0-f43.google.com with SMTP id f51so1212858qge.2 for ; Thu, 13 Feb 2014 07:15:59 -0800 (PST) Sender: Richard Henderson Message-ID: <52FCE1AA.4080509@twiddle.net> Date: Thu, 13 Feb 2014 07:15:54 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1392283031-40129-1-git-send-email-borntraeger@de.ibm.com> <1392283031-40129-2-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1392283031-40129-2-git-send-email-borntraeger@de.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 1/3] s390-ccw.img: Fix sporadic reboot hangs: Initialize next_idx List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger , Anthony Liguori , Peter Maydell Cc: Cornelia Huck , Jens Freimann , Alexander Graf , =?ISO-8859-1?Q?Andreas_F=E4rber?= , qemu-devel On 02/13/2014 01:17 AM, Christian Borntraeger wrote: > The current code does not initialize next_idx as the qemu > elf loader does not zero the bss section. > Make the initialization explicit. > > Signed-off-by: Christian Borntraeger > --- > pc-bios/s390-ccw/virtio.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c > index 4d6e48f..a46914d 100644 > --- a/pc-bios/s390-ccw/virtio.c > +++ b/pc-bios/s390-ccw/virtio.c > @@ -124,6 +124,7 @@ static void vring_init(struct vring *vr, unsigned int num, void *p, > vr->used->flags = VRING_USED_F_NO_NOTIFY; > vr->used->idx = 0; > vr->used_idx = 0; > + vr->next_idx = 0; > > debug_print_addr("init vr", vr); > } > FWIW, I believe that rom_reset needs to do this re-zeroing of the bss. That seems to be the only place we don't take care for datasize != romsize. r~