lkml.org 
[lkml]   [2018]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/6] xenbus: process otherend_watch event at 'state' entry in xenwatch multithreading
Date
This is the 4th patch of a (6-patch) patch set.

With this patch, watch event in absolute path pattern
'/local/domain/<domid>/device/<pvdev>/<handle>/state' can be processed in
per-domU xenwatch thread.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
---
drivers/xen/xenbus/xenbus_probe.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 5755596..ba0644c 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -129,11 +129,27 @@ static int talk_to_otherend(struct xenbus_device *dev)
}


+static domid_t otherend_get_domid(struct xenbus_watch *watch,
+ const char *path,
+ const char *token)
+{
+ struct xenbus_device *xendev =
+ container_of(watch, struct xenbus_device, otherend_watch);
+
+ return xendev->otherend_id;
+}
+

static int watch_otherend(struct xenbus_device *dev)
{
struct xen_bus_type *bus =
container_of(dev->dev.bus, struct xen_bus_type, bus);
+ struct xenbus_driver *drv = to_xenbus_driver(dev->dev.driver);
+
+ if (xen_mtwatch && drv->use_mtwatch) {
+ dev->otherend_watch.get_domid = otherend_get_domid;
+ dev->otherend_watch.owner_id = dev->otherend_id;
+ }

return xenbus_watch_pathfmt(dev, &dev->otherend_watch,
bus->otherend_changed,
--
2.7.4
\
 
 \ /
  Last update: 2018-09-14 09:35    [W:0.147 / U:2.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site