aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/xenbus/xenbus_xs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen/xenbus/xenbus_xs.c')
-rw-r--r--drivers/xen/xenbus/xenbus_xs.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index d1c217b23a42..bce15cf4a8df 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -618,6 +618,23 @@ static struct xenbus_watch *find_watch(const char *token)
618 return NULL; 618 return NULL;
619} 619}
620 620
621static void xs_reset_watches(void)
622{
623 int err, supported = 0;
624
625 if (!xen_hvm_domain())
626 return;
627
628 err = xenbus_scanf(XBT_NIL, "control",
629 "platform-feature-xs_reset_watches", "%d", &supported);
630 if (err != 1 || !supported)
631 return;
632
633 err = xs_error(xs_single(XBT_NIL, XS_RESET_WATCHES, "", NULL));
634 if (err && err != -EEXIST)
635 printk(KERN_WARNING "xs_reset_watches failed: %d\n", err);
636}
637
621/* Register callback to watch this node. */ 638/* Register callback to watch this node. */
622int register_xenbus_watch(struct xenbus_watch *watch) 639int register_xenbus_watch(struct xenbus_watch *watch)
623{ 640{
@@ -900,5 +917,8 @@ int xs_init(void)
900 if (IS_ERR(task)) 917 if (IS_ERR(task))
901 return PTR_ERR(task); 918 return PTR_ERR(task);
902 919
920 /* shutdown watches for kexec boot */
921 xs_reset_watches();
922
903 return 0; 923 return 0;
904} 924}