diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2013-05-23 13:51:41 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-05-31 12:50:46 -0500 |
commit | 39c93c67c5995bd8db7a3fa3b95dcd4e6bc881a7 (patch) | |
tree | 63336375166a322f3f1c61413c23f162eb847e18 /pc-bios | |
parent | 0a1f348c429a6af0ba6448e5b3ae08dbc8e28696 (diff) |
s390/ipl: Fix spurious errors in virtio
With the ccw ipl code sometimes an error message like
"virtio: trying to map MMIO memory" or
"Guest moved used index from %u to %u" appeared. Turns out
that the ccw bios did not zero out the vring, which might
cause stale values in avail->idx and friends, especially
on reboot.
Lets zero out the relevant fields. To activate the patch we
need to rebuild s390-ccw.img as well.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-id: 1369309901-418-1-git-send-email-borntraeger@de.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'pc-bios')
-rw-r--r-- | pc-bios/s390-ccw/virtio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c index 5b9e1dc107..f438af15aa 100644 --- a/pc-bios/s390-ccw/virtio.c +++ b/pc-bios/s390-ccw/virtio.c @@ -114,8 +114,13 @@ static void vring_init(struct vring *vr, unsigned int num, void *p, vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + align-1) & ~(align - 1)); + /* Zero out all relevant field */ + vr->avail->flags = 0; + vr->avail->idx = 0; + /* We're running with interrupts off anyways, so don't bother */ vr->used->flags = VRING_USED_F_NO_NOTIFY; + vr->used->idx = 0; debug_print_addr("init vr", vr); } |