aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest
diff options
context:
space:
mode:
authorHeinz Graalfs <graalfs@linux.vnet.ibm.com>2013-10-28 19:08:50 -0400
committerRusty Russell <rusty@rustcorp.com.au>2013-10-28 20:58:11 -0400
commit46f9c2b925ac12e5ad8b8b7c90c71dacc9d5db37 (patch)
tree39b9bd752cb3cb43a5e11d4f0fc35f425f1d02e2 /drivers/lguest
parent630b54d33493d1f67e79b148b5e361c5bbd3f29d (diff)
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/lguest')
-rw-r--r--drivers/lguest/lguest_device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c
index b3256ff0d426..d0a1d8a45c81 100644
--- a/drivers/lguest/lguest_device.c
+++ b/drivers/lguest/lguest_device.c
@@ -229,7 +229,7 @@ struct lguest_vq_info {
229 * make a hypercall. We hand the physical address of the virtqueue so the Host 229 * make a hypercall. We hand the physical address of the virtqueue so the Host
230 * knows which virtqueue we're talking about. 230 * knows which virtqueue we're talking about.
231 */ 231 */
232static void lg_notify(struct virtqueue *vq) 232static bool lg_notify(struct virtqueue *vq)
233{ 233{
234 /* 234 /*
235 * We store our virtqueue information in the "priv" pointer of the 235 * We store our virtqueue information in the "priv" pointer of the
@@ -238,6 +238,7 @@ static void lg_notify(struct virtqueue *vq)
238 struct lguest_vq_info *lvq = vq->priv; 238 struct lguest_vq_info *lvq = vq->priv;
239 239
240 hcall(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT, 0, 0, 0); 240 hcall(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT, 0, 0, 0);
241 return true;
241} 242}
242 243
243/* An extern declaration inside a C file is bad form. Don't do it. */ 244/* An extern declaration inside a C file is bad form. Don't do it. */