diff options
| -rw-r--r-- | drivers/xen/xenbus/xenbus_xs.c | 20 | ||||
| -rw-r--r-- | include/xen/interface/io/xs_wire.h | 3 |
2 files changed, 22 insertions, 1 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 | ||
| 621 | static 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. */ |
| 622 | int register_xenbus_watch(struct xenbus_watch *watch) | 639 | int 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 | } |
diff --git a/include/xen/interface/io/xs_wire.h b/include/xen/interface/io/xs_wire.h index 7cdfca24eafb..794deb07eb53 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" |
