[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1536910456-13337-5-git-send-email-dongli.zhang@oracle.com>
Date: Fri, 14 Sep 2018 15:34:14 +0800
From: Dongli Zhang <dongli.zhang@...cle.com>
To: xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org
Cc: boris.ostrovsky@...cle.com, jgross@...e.com,
paul.durrant@...rix.com, wei.liu2@...rix.com,
konrad.wilk@...cle.com, roger.pau@...rix.com,
srinivas.eeda@...cle.com
Subject: [PATCH 4/6] xenbus: process otherend_watch event at 'state' entry in xenwatch multithreading
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@...cle.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
Powered by blists - more mailing lists