···865865}866866EXPORT_SYMBOL_GPL(virtqueue_is_broken);867867868868+/*869869+ * This should prevent the device from being used, allowing drivers to870870+ * recover. You may need to grab appropriate locks to flush.871871+ */872872+void virtio_break_device(struct virtio_device *dev)873873+{874874+ struct virtqueue *_vq;875875+876876+ list_for_each_entry(_vq, &dev->vqs, list) {877877+ struct vring_virtqueue *vq = to_vvq(_vq);878878+ vq->broken = true;879879+ }880880+}881881+EXPORT_SYMBOL_GPL(virtio_break_device);882882+868883MODULE_LICENSE("GPL");
+2
include/linux/virtio.h
···106106int register_virtio_device(struct virtio_device *dev);107107void unregister_virtio_device(struct virtio_device *dev);108108109109+void virtio_break_device(struct virtio_device *dev);110110+109111/**110112 * virtio_driver - operations for a virtio I/O driver111113 * @driver: underlying device driver (populate name and owner).