virtio: correctly initialize vm_running
authorJason Wang <jasowang@redhat.com>
Wed, 18 May 2011 05:57:37 +0000 (13:57 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 12 Jun 2011 07:33:38 +0000 (10:33 +0300)
commitd3674c5754775eb65ec2f2fd5f8cfe9b032ca0b1
treebb074dc6c76acef80cd297fa001f80ef0d44886e
parent7157e2e23e89adcd436caeab31fdd6b47eded377
virtio: correctly initialize vm_running

Current vm_running was not explicitly initialized and its value was changed by
vm state notifier, this may confuse the virtio device being hotplugged such as
virtio-net with vhost backend as it may think the vm was not running. Solve this
by initialize this value explicitly in virtio_common_init().

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio.c