diff options
-rw-r--r-- | drivers/xen/xenbus/xenbus_xs.c | 13 | ||||
-rw-r--r-- | include/xen/interface/io/xs_wire.h | 3 |
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c index 46347a49c5b8..d1071de11878 100644 --- a/drivers/xen/xenbus/xenbus_xs.c +++ b/drivers/xen/xenbus/xenbus_xs.c | |||
@@ -620,6 +620,15 @@ static struct xenbus_watch *find_watch(const char *token) | |||
620 | return NULL; | 620 | return NULL; |
621 | } | 621 | } |
622 | 622 | ||
623 | static void xs_reset_watches(void) | ||
624 | { | ||
625 | int err; | ||
626 | |||
627 | err = xs_error(xs_single(XBT_NIL, XS_RESET_WATCHES, "", NULL)); | ||
628 | if (err && err != -EEXIST) | ||
629 | printk(KERN_WARNING "xs_reset_watches failed: %d\n", err); | ||
630 | } | ||
631 | |||
623 | /* Register callback to watch this node. */ | 632 | /* Register callback to watch this node. */ |
624 | int register_xenbus_watch(struct xenbus_watch *watch) | 633 | int register_xenbus_watch(struct xenbus_watch *watch) |
625 | { | 634 | { |
@@ -896,5 +905,9 @@ int xs_init(void) | |||
896 | if (IS_ERR(task)) | 905 | if (IS_ERR(task)) |
897 | return PTR_ERR(task); | 906 | return PTR_ERR(task); |
898 | 907 | ||
908 | /* shutdown watches for kexec boot */ | ||
909 | if (xen_hvm_domain()) | ||
910 | xs_reset_watches(); | ||
911 | |||
899 | return 0; | 912 | return 0; |
900 | } | 913 | } |
diff --git a/include/xen/interface/io/xs_wire.h b/include/xen/interface/io/xs_wire.h index f6f07aa35af5..f0b6890370be 100644 --- a/include/xen/interface/io/xs_wire.h +++ b/include/xen/interface/io/xs_wire.h | |||
@@ -29,7 +29,8 @@ enum xsd_sockmsg_type | |||
29 | XS_IS_DOMAIN_INTRODUCED, | 29 | XS_IS_DOMAIN_INTRODUCED, |
30 | XS_RESUME, | 30 | XS_RESUME, |
31 | XS_SET_TARGET, | 31 | XS_SET_TARGET, |
32 | XS_RESTRICT | 32 | XS_RESTRICT, |
33 | XS_RESET_WATCHES | ||
33 | }; | 34 | }; |
34 | 35 | ||
35 | #define XS_WRITE_NONE "NONE" | 36 | #define XS_WRITE_NONE "NONE" |