diff options
author | Jens Freimann <jfrei@linux.vnet.ibm.com> | 2012-04-26 09:03:36 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-05-01 21:04:06 +0200 |
commit | 4170aea1a77d7adf9e35ab4d3c17086c38ca6c09 (patch) | |
tree | 4d4f50dff271275e102569c86aea1a12e96bdfc3 /hw/s390-virtio-bus.h | |
parent | eca3ed0343ba413937f34ad4f8c4822dc82924e5 (diff) | |
download | qemu-4170aea1a77d7adf9e35ab4d3c17086c38ca6c09.zip qemu-4170aea1a77d7adf9e35ab4d3c17086c38ca6c09.tar.gz qemu-4170aea1a77d7adf9e35ab4d3c17086c38ca6c09.tar.bz2 |
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-bus.h')
-rw-r--r-- | hw/s390-virtio-bus.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/s390-virtio-bus.h b/hw/s390-virtio-bus.h index 0e60bc0..49e6c46 100644 --- a/hw/s390-virtio-bus.h +++ b/hw/s390-virtio-bus.h @@ -34,6 +34,8 @@ #define VIRTIO_VQCONFIG_LEN 24 #define VIRTIO_RING_LEN (TARGET_PAGE_SIZE * 3) +#define VIRTIO_VRING_AVAIL_IDX_OFFS 2 +#define VIRTIO_VRING_USED_IDX_OFFS 2 #define S390_DEVICE_PAGES 512 #define VIRTIO_PARAM_MASK 0xff @@ -90,3 +92,5 @@ VirtIOS390Device *s390_virtio_bus_find_vring(VirtIOS390Bus *bus, ram_addr_t mem, int *vq_num); VirtIOS390Device *s390_virtio_bus_find_mem(VirtIOS390Bus *bus, ram_addr_t mem); void s390_virtio_device_sync(VirtIOS390Device *dev); +void s390_virtio_reset_idx(VirtIOS390Device *dev); + |