 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Minios-devel] [PATCH MINI-OS v2] xenbus: notify the other end when necessary
 On Mon, Oct 26, 2015 at 05:43:53PM +0100, Samuel Thibault wrote:
> Also, just to make sure: you tested with the third and fourth hooks of
> your v2 patch applied, only first and second hooks were removed?
> 
> Samuel
See the patch below.
From 0643a821ce2795e7e65e199e7caaa657f27bafcf Mon Sep 17 00:00:00 2001
From: Wei Liu <wei.liu2@xxxxxxxxxx>
Date: Fri, 23 Oct 2015 20:01:06 +0100
Subject: [PATCH] Test patch
---
 xenbus/xenbus.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/xenbus/xenbus.c b/xenbus/xenbus.c
index 4613ed6..0ab387a 100644
--- a/xenbus/xenbus.c
+++ b/xenbus/xenbus.c
@@ -237,6 +237,7 @@ static void xenbus_thread_func(void *ign)
                event->path = data;
                event->token = event->path + strlen(event->path) + 1;
 
+                mb();
                 xenstore_buf->rsp_cons += msg.len + sizeof(msg);
 
                 for (watch = watches; watch; watch = watch->next)
@@ -262,9 +263,13 @@ static void xenbus_thread_func(void *ign)
                     req_info[msg.req_id].reply,
                     MASK_XENSTORE_IDX(xenstore_buf->rsp_cons),
                     msg.len + sizeof(msg));
+                mb();
                 xenstore_buf->rsp_cons += msg.len + sizeof(msg);
                 wake_up(&req_info[msg.req_id].waitq);
             }
+
+            wmb();
+            notify_remote_via_evtchn(start_info.store_evtchn);
         }
     }
 }
-- 
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |