virtio: ring sizes vs. reset
commit46c5d0823d0186daf4064065bf739858dadfcf8c
authorCornelia Huck <cornelia.huck@de.ibm.com>
Fri, 11 Sep 2015 13:16:41 +0000 (11 15:16 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 24 Sep 2015 10:42:17 +0000 (24 13:42 +0300)
tree0a39ac5cce8786400bdeda3bc829567846eed933
parent87e896abe6d926caba19a9b8a83936fca2137f05
virtio: ring sizes vs. reset

We allow guests to change the size of the virtqueue rings by supplying
a number of buffers that is different from the number of buffers the
device was initialized with. Current code has some problems, however,
since reset does not reset the ringsizes to the default values (as this
is not saved anywhere).

Let's extend the core code to keep track of the default ringsizes and
migrate them once the guest changed them for any of the virtqueues
for a device.

Reviewed-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio.c