From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIEtF-0007rN-Em for qemu-devel@nongnu.org; Tue, 25 Feb 2014 05:05:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIEt6-0005Cn-Gn for qemu-devel@nongnu.org; Tue, 25 Feb 2014 05:05:29 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:52246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIEt6-0005Bw-6g for qemu-devel@nongnu.org; Tue, 25 Feb 2014 05:05:20 -0500 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Feb 2014 10:05:18 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 8159A219005C for ; Tue, 25 Feb 2014 10:05:13 +0000 (GMT) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s1PA54tv60751956 for ; Tue, 25 Feb 2014 10:05:04 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s1PA5FS7025258 for ; Tue, 25 Feb 2014 03:05:16 -0700 From: Christian Borntraeger Date: Tue, 25 Feb 2014 11:05:33 +0100 Message-Id: <1393322735-31277-16-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1393322735-31277-1-git-send-email-borntraeger@de.ibm.com> References: <1393322735-31277-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PATCH 15/17] s390-ccw.img: Fix sporadic reboot hangs: Initialize next_idx List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , Peter Maydell Cc: qemu-devel , Alexander Graf , Christian Borntraeger , Jens Freimann , Cornelia Huck , Paolo Bonzini , Richard Henderson The current code does not initialize next_idx in the virtio ring. As the ccw bios will always use guest memory at a fixed location, this queue might != 0 after a reboot. Lets make the initialization explicit. Signed-off-by: Christian Borntraeger Reviewed-by: Cornelia Huck --- 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); } -- 1.8.4.2