aboutsummaryrefslogtreecommitdiff
path: root/hw/s390-virtio.c
diff options
context:
space:
mode:
authorJens Freimann <jfrei@linux.vnet.ibm.com>2012-04-26 09:03:36 +0000
committerAlexander Graf <agraf@suse.de>2012-05-01 21:04:06 +0200
commit4170aea1a77d7adf9e35ab4d3c17086c38ca6c09 (patch)
tree4d4f50dff271275e102569c86aea1a12e96bdfc3 /hw/s390-virtio.c
parenteca3ed0343ba413937f34ad4f8c4822dc82924e5 (diff)
s390: reset avail and used index on reboot
reset the guest vring avail/used idx fields, otherwise it's possible that old values remain in memory which would cause a reboot to fail with a "Guest moved used index" message Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/s390-virtio.c')
-rw-r--r--hw/s390-virtio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index d7dc8571d8..c0e19fd66d 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -99,6 +99,7 @@ int s390_virtio_hypercall(CPUS390XState *env, uint64_t mem, uint64_t hypercall)
virtio_reset(dev->vdev);
stb_phys(dev->dev_offs + VIRTIO_DEV_OFFS_STATUS, 0);
s390_virtio_device_sync(dev);
+ s390_virtio_reset_idx(dev);
break;
}
case KVM_S390_VIRTIO_SET_STATUS: