qemu/virtio: fix reset with device removal
commite489030df2448d22b3cb92fd5dcb22c6fa0fc9e1
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 16 Sep 2009 10:40:37 +0000 (16 13:40 +0300)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 5 Oct 2009 14:32:50 +0000 (5 09:32 -0500)
treefa7fbf08a1d4ba2d303b93bbbaa2224421cc68b9
parent7f23f812c49da6d6fe03bcd4bc2d07341e93db11
qemu/virtio: fix reset with device removal

virtio pci registers its own reset handler, but fails to unregister it,
which will lead to crashes after device removal.  Solve this problem by
switching to qdev reset handler, which is automatically unregistered.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/virtio-pci.c