]> git.proxmox.com Git - qemu.git/commit
virtio-rng: use virtqueue_get_avail_bytes, fix migration
authorAmit Shah <amit.shah@redhat.com>
Wed, 21 Nov 2012 05:51:18 +0000 (11:21 +0530)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 26 Nov 2012 20:26:37 +0000 (14:26 -0600)
commit14417039653d3293a795646730a7bf5055d78709
tree4c32716c715f9dbc1a8b547fef715d3ec30d2706
parent25d87288b150032fedcf7b5380fb54fdbdd6788d
virtio-rng: use virtqueue_get_avail_bytes, fix migration

Popping an elem from the vq just to find out its length causes problems
with save/load later on.  Use the new virtqueue_get_avail_bytes()
function instead, saves us the complexity in the migration code, as well
as makes the migration endian-safe.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/virtio-rng.c