virtio: fix up VQ checks
commit1abeb5a65d515f8a8a9cfc4a82342f731bd9321f
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 23 Nov 2010 19:55:39 +0000 (23 21:55 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 24 Nov 2010 15:25:44 +0000 (24 17:25 +0200)
tree8af38bcbf8192f7ef000e58ef1162308b658faf0
parentce67ed65000b8f56c6e0576a1a9d3c4b0f596f5c
virtio: fix up VQ checks

When migration triggers before a VQ is initialized,
base pa is 0 and last_used_index must be 0 too:
we don't have a ring to compare to.

Reported-by: Juan Quintela <quintela@redhat.com>
Tested-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio.c