search for: notify_virtio_device

Displaying 13 results from an estimated 13 matches for "notify_virtio_device".

2013 Nov 21
5
[PATCH v2 RFC 0/3] virtio: add new notify() callback to virtio_driver
Hi, here is an updated patch-set with changes as suggested by Michael Tsirkin. When an active virtio block device is hot-unplugged from a KVM guest, running affected guest user applications are not aware of any errors that occur due to the lost device. This patch-set adds code to avoid further request queueing when a lost block device is detected, resulting in appropriate error info. On System z
2013 Nov 21
5
[PATCH v2 RFC 0/3] virtio: add new notify() callback to virtio_driver
Hi, here is an updated patch-set with changes as suggested by Michael Tsirkin. When an active virtio block device is hot-unplugged from a KVM guest, running affected guest user applications are not aware of any errors that occur due to the lost device. This patch-set adds code to avoid further request queueing when a lost block device is detected, resulting in appropriate error info. On System z
2013 Nov 20
0
[PATCH RFC 1/3] virtio: add notify() callback to virtio_driver
...tions(+) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index ee59b74..a09abb4 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -186,6 +186,14 @@ void unregister_virtio_driver(struct virtio_driver *driver) } EXPORT_SYMBOL_GPL(unregister_virtio_driver); +int notify_virtio_device(struct virtio_device *vdev, int event) +{ + struct virtio_driver *drv = drv_to_virtio(vdev->dev.driver); + + return drv->notify ? drv->notify(vdev, event) : NOTIFY_DONE; +} +EXPORT_SYMBOL_GPL(notify_virtio_device); + int register_virtio_device(struct virtio_device *dev) { int err; diff...
2013 Nov 21
0
[PATCH v2 RFC 1/3] virtio: add notify() callback to virtio_driver
.../module.h> #include <linux/idr.h> +#include <linux/notifier.h> /* Unique numbering for virtio devices. */ static DEFINE_IDA(virtio_index_ida); @@ -186,6 +187,14 @@ void unregister_virtio_driver(struct virtio_driver *driver) } EXPORT_SYMBOL_GPL(unregister_virtio_driver); +int notify_virtio_device(struct virtio_device *vdev, int event) +{ + struct virtio_driver *drv = drv_to_virtio(vdev->dev.driver); + + return drv->notify ? drv->notify(vdev, event) : NOTIFY_DONE; +} +EXPORT_SYMBOL_GPL(notify_virtio_device); + int register_virtio_device(struct virtio_device *dev) { int err; diff...
2013 Nov 20
9
[PATCH RFC 0/3] virtio: add new notify() callback to virtio_driver
Hi, when an active virtio block device is hot-unplugged from a KVM guest, running affected guest user applications are not aware of any errors that occur due to the lost device. This patch-set adds code to avoid further request queueing when a lost block device is detected, resulting in appropriate error info. On System z there exists no handshake mechanism between host and guest when a device
2013 Nov 20
9
[PATCH RFC 0/3] virtio: add new notify() callback to virtio_driver
Hi, when an active virtio block device is hot-unplugged from a KVM guest, running affected guest user applications are not aware of any errors that occur due to the lost device. This patch-set adds code to avoid further request queueing when a lost block device is detected, resulting in appropriate error info. On System z there exists no handshake mechanism between host and guest when a device
2013 Nov 21
2
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...o_ccw_cio_notify(struct ccw_device *cdev, int event) > { > - /* TODO: Check whether we need special handling here. */ > - return 0; > + int rc; > + struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); > + > + switch (event) { > + case CIO_GONE: > + rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); > + break; > + default: > + rc = NOTIFY_DONE; > + break; > + } > + return rc; > } > > static struct ccw_device_id virtio_ids[] = { > -- > 1.8.3.1
2013 Nov 21
2
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...o_ccw_cio_notify(struct ccw_device *cdev, int event) > { > - /* TODO: Check whether we need special handling here. */ > - return 0; > + int rc; > + struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); > + > + switch (event) { > + case CIO_GONE: > + rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); > + break; > + default: > + rc = NOTIFY_DONE; > + break; > + } > + return rc; > } > > static struct ccw_device_id virtio_ids[] = { > -- > 1.8.3.1
2013 Nov 21
2
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...; >>- /* TODO: Check whether we need special handling here. */ > >>- return 0; > >>+ int rc; > >>+ struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); > >>+ > >>+ switch (event) { > >>+ case CIO_GONE: > >>+ rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); > >>+ break; > >>+ default: > >>+ rc = NOTIFY_DONE; > >>+ break; > >>+ } > >>+ return rc; > >> } > >> > >> static struct ccw_device_id virtio_ids[] = { > >>-- > >&gt...
2013 Nov 21
2
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...; >>- /* TODO: Check whether we need special handling here. */ > >>- return 0; > >>+ int rc; > >>+ struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); > >>+ > >>+ switch (event) { > >>+ case CIO_GONE: > >>+ rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); > >>+ break; > >>+ default: > >>+ rc = NOTIFY_DONE; > >>+ break; > >>+ } > >>+ return rc; > >> } > >> > >> static struct ccw_device_id virtio_ids[] = { > >>-- > >&gt...
2013 Nov 21
0
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...4,8 +1065,18 @@ out_free: static int virtio_ccw_cio_notify(struct ccw_device *cdev, int event) { - /* TODO: Check whether we need special handling here. */ - return 0; + int rc; + struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); + + switch (event) { + case CIO_GONE: + rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); + break; + default: + rc = NOTIFY_DONE; + break; + } + return rc; } static struct ccw_device_id virtio_ids[] = { -- 1.8.3.1
2013 Nov 21
0
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...dev, int event) >> { >> - /* TODO: Check whether we need special handling here. */ >> - return 0; >> + int rc; >> + struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); >> + >> + switch (event) { >> + case CIO_GONE: >> + rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); >> + break; >> + default: >> + rc = NOTIFY_DONE; >> + break; >> + } >> + return rc; >> } >> >> static struct ccw_device_id virtio_ids[] = { >> -- >> 1.8.3.1 >
2013 Nov 27
0
[PATCH v2 RFC 3/3] virtio_ccw: invoke virtio_driver's notify() on CIO_GONE notification
...hether we need special handling here. */ >>>> - return 0; >>>> + int rc; >>>> + struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); >>>> + >>>> + switch (event) { >>>> + case CIO_GONE: >>>> + rc = notify_virtio_device(&vcdev->vdev, VDEV_GONE); >>>> + break; >>>> + default: >>>> + rc = NOTIFY_DONE; >>>> + break; >>>> + } >>>> + return rc; >>>> } >>>> >>>> static struct ccw_device_id virtio_ids...