aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/kvm/virtio_ccw.c
diff options
context:
space:
mode:
authorHeinz Graalfs <graalfs@linux.vnet.ibm.com>2013-10-29 09:38:50 +1030
committerRusty Russell <rusty@rustcorp.com.au>2013-10-29 11:28:11 +1030
commit46f9c2b925ac12e5ad8b8b7c90c71dacc9d5db37 (patch)
tree39b9bd752cb3cb43a5e11d4f0fc35f425f1d02e2 /drivers/s390/kvm/virtio_ccw.c
parentvirtio_config: remove virtio_config_val (diff)
downloadlinux-dev-46f9c2b925ac12e5ad8b8b7c90c71dacc9d5db37.tar.xz
linux-dev-46f9c2b925ac12e5ad8b8b7c90c71dacc9d5db37.zip
virtio_ring: change host notification API
Currently a host kick error is silently ignored and not reflected in the virtqueue of a particular virtio device. Changing the notify API for guest->host notification seems to be one prerequisite in order to be able to handle such errors in the context where the kick is triggered. This patch changes the notify API. The notify function must return a bool return value. It returns false if the host notification failed. Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/s390/kvm/virtio_ccw.c')
-rw-r--r--drivers/s390/kvm/virtio_ccw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c
index 779dc5136291..d6297176ab85 100644
--- a/drivers/s390/kvm/virtio_ccw.c
+++ b/drivers/s390/kvm/virtio_ccw.c
@@ -162,7 +162,7 @@ static inline long do_kvm_notify(struct subchannel_id schid,
return __rc;
}
-static void virtio_ccw_kvm_notify(struct virtqueue *vq)
+static bool virtio_ccw_kvm_notify(struct virtqueue *vq)
{
struct virtio_ccw_vq_info *info = vq->priv;
struct virtio_ccw_device *vcdev;
@@ -171,6 +171,9 @@ static void virtio_ccw_kvm_notify(struct virtqueue *vq)
vcdev = to_vc_device(info->vq->vdev);
ccw_device_get_schid(vcdev->cdev, &schid);
info->cookie = do_kvm_notify(schid, vq->index, info->cookie);
+ if (info->cookie < 0)
+ return false;
+ return true;
}
static int virtio_ccw_read_vq_conf(struct virtio_ccw_device *vcdev,