So drivers can do whatever necessary on reset.

Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]>

Index: kvm-userspace.vblk/qemu/hw/virtio.c
===================================================================
--- kvm-userspace.vblk.orig/qemu/hw/virtio.c
+++ kvm-userspace.vblk/qemu/hw/virtio.c
@@ -207,6 +207,9 @@ void virtio_reset(void *opaque)
     VirtIODevice *vdev = opaque;
     int i;
 
+    if (vdev->reset)
+        vdev->reset(vdev);
+
     vdev->features = 0;
     vdev->queue_sel = 0;
     vdev->status = 0;
Index: kvm-userspace.vblk/qemu/hw/virtio.h
===================================================================
--- kvm-userspace.vblk.orig/qemu/hw/virtio.h
+++ kvm-userspace.vblk/qemu/hw/virtio.h
@@ -116,6 +116,7 @@ struct VirtIODevice
     uint32_t (*get_features)(VirtIODevice *vdev);
     void (*set_features)(VirtIODevice *vdev, uint32_t val);
     void (*update_config)(VirtIODevice *vdev, uint8_t *config);
+    void (*reset)(VirtIODevice *vdev);
     VirtQueue vq[VIRTIO_PCI_QUEUE_MAX];
 };
 

-- 

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to