summaryrefslogtreecommitdiffstats
path: root/pc-bios
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2014-02-12 16:17:35 +0100
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-02-27 09:51:25 +0100
commitd1028f1b5b4cf83e8af5f48996cf392fb12d391a (patch)
tree9d340b40ab005a89a05ac86952fcb047459cb033 /pc-bios
parentc804c2a71752dd1e150cde768d8c54b02fa8bad9 (diff)
downloadhqemu-d1028f1b5b4cf83e8af5f48996cf392fb12d391a.zip
hqemu-d1028f1b5b4cf83e8af5f48996cf392fb12d391a.tar.gz
s390-ccw.img: Fix sporadic reboot hangs: Initialize next_idx
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 <borntraeger@de.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'pc-bios')
-rw-r--r--pc-bios/s390-ccw/virtio.c1
1 files changed, 1 insertions, 0 deletions
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);
}
OpenPOWER on IntegriCloud