diff options
author | Jan Beulich <JBeulich@novell.com> | 2010-10-04 05:37:26 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2011-03-15 12:02:18 -0400 |
commit | 066d6c7f4ec94d40d13061714489783916548cdb (patch) | |
tree | b3b8763e74d59ea93a948b2527d83c33d32ad968 /include/xen | |
parent | 57539c1cf9f146ab9988a350dbc2d7e69a8a5c30 (diff) |
watchdog: Xen watchdog driver
While the hypervisor change adding SCHEDOP_watchdog support included a
daemon to make use of the new functionality, having a kernel driver
for /dev/watchdog so that user space code doesn't need to distinguish
non-Xen and Xen seems to be preferable.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'include/xen')
-rw-r--r-- | include/xen/interface/sched.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/xen/interface/sched.h b/include/xen/interface/sched.h index 5fec575a800a..dd55dac340de 100644 --- a/include/xen/interface/sched.h +++ b/include/xen/interface/sched.h | |||
@@ -65,6 +65,39 @@ struct sched_poll { | |||
65 | DEFINE_GUEST_HANDLE_STRUCT(sched_poll); | 65 | DEFINE_GUEST_HANDLE_STRUCT(sched_poll); |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * Declare a shutdown for another domain. The main use of this function is | ||
69 | * in interpreting shutdown requests and reasons for fully-virtualized | ||
70 | * domains. A para-virtualized domain may use SCHEDOP_shutdown directly. | ||
71 | * @arg == pointer to sched_remote_shutdown structure. | ||
72 | */ | ||
73 | #define SCHEDOP_remote_shutdown 4 | ||
74 | struct sched_remote_shutdown { | ||
75 | domid_t domain_id; /* Remote domain ID */ | ||
76 | unsigned int reason; /* SHUTDOWN_xxx reason */ | ||
77 | }; | ||
78 | |||
79 | /* | ||
80 | * Latch a shutdown code, so that when the domain later shuts down it | ||
81 | * reports this code to the control tools. | ||
82 | * @arg == as for SCHEDOP_shutdown. | ||
83 | */ | ||
84 | #define SCHEDOP_shutdown_code 5 | ||
85 | |||
86 | /* | ||
87 | * Setup, poke and destroy a domain watchdog timer. | ||
88 | * @arg == pointer to sched_watchdog structure. | ||
89 | * With id == 0, setup a domain watchdog timer to cause domain shutdown | ||
90 | * after timeout, returns watchdog id. | ||
91 | * With id != 0 and timeout == 0, destroy domain watchdog timer. | ||
92 | * With id != 0 and timeout != 0, poke watchdog timer and set new timeout. | ||
93 | */ | ||
94 | #define SCHEDOP_watchdog 6 | ||
95 | struct sched_watchdog { | ||
96 | uint32_t id; /* watchdog ID */ | ||
97 | uint32_t timeout; /* timeout */ | ||
98 | }; | ||
99 | |||
100 | /* | ||
68 | * Reason codes for SCHEDOP_shutdown. These may be interpreted by control | 101 | * Reason codes for SCHEDOP_shutdown. These may be interpreted by control |
69 | * software to determine the appropriate action. For the most part, Xen does | 102 | * software to determine the appropriate action. For the most part, Xen does |
70 | * not care about the shutdown code. | 103 | * not care about the shutdown code. |
@@ -73,5 +106,6 @@ DEFINE_GUEST_HANDLE_STRUCT(sched_poll); | |||
73 | #define SHUTDOWN_reboot 1 /* Clean up, kill, and then restart. */ | 106 | #define SHUTDOWN_reboot 1 /* Clean up, kill, and then restart. */ |
74 | #define SHUTDOWN_suspend 2 /* Clean up, save suspend info, kill. */ | 107 | #define SHUTDOWN_suspend 2 /* Clean up, save suspend info, kill. */ |
75 | #define SHUTDOWN_crash 3 /* Tell controller we've crashed. */ | 108 | #define SHUTDOWN_crash 3 /* Tell controller we've crashed. */ |
109 | #define SHUTDOWN_watchdog 4 /* Restart because watchdog time expired. */ | ||
76 | 110 | ||
77 | #endif /* __XEN_PUBLIC_SCHED_H__ */ | 111 | #endif /* __XEN_PUBLIC_SCHED_H__ */ |