s390/ipl: Fix spurious errors in virtio
PATCH 1/1 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.
--- pc-bios/s390-ccw/virtio.c | 5 +++++ 1 file changed, 5 insertions(+)
pc-bios/s390-ccw/virtio.c +5 -0
@@ -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); }
Signature · 1 line
1.8.1.4
Am 23.05.2013 13:51, schrieb Christian Borntraeger:
Quoted 11 lines
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 inavail->idxand 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 <[email protected]>
Indeed no such errors any more, but I'm still seeing other issues with rebooting some initrds (BNC#812983).
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Anthony Liguori
AppliedApplied. Thanks.
Regards,
Anthony Liguori