From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vitaly Kuznetsov Subject: [PATCH RFC/WIP 1/4] Introduce SHUTDOWN_kexec shutdown reason Date: Mon, 25 Aug 2014 15:42:23 +0200 Message-ID: <1408974146-6519-2-git-send-email-vkuznets@redhat.com> References: <1408974146-6519-1-git-send-email-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XLuXe-0006q8-0D for xen-devel@lists.xenproject.org; Mon, 25 Aug 2014 13:42:38 +0000 In-Reply-To: <1408974146-6519-1-git-send-email-vkuznets@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Andrew Jones , David Vrabel , Jan Beulich List-Id: xen-devel@lists.xenproject.org Signed-off-by: Vitaly Kuznetsov --- tools/libxl/libxl_types.idl | 1 + tools/python/xen/lowlevel/xl/xl.c | 1 + xen/include/public/sched.h | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index 649ce50..2405c13 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -148,6 +148,7 @@ libxl_shutdown_reason = Enumeration("shutdown_reason", [ (2, "suspend"), (3, "crash"), (4, "watchdog"), + (5, "kexec"), ], init_val = "LIBXL_SHUTDOWN_REASON_UNKNOWN") libxl_vga_interface_type = Enumeration("vga_interface_type", [ diff --git a/tools/python/xen/lowlevel/xl/xl.c b/tools/python/xen/lowlevel/xl/xl.c index 32f982a..04231f1 100644 --- a/tools/python/xen/lowlevel/xl/xl.c +++ b/tools/python/xen/lowlevel/xl/xl.c @@ -784,6 +784,7 @@ PyMODINIT_FUNC initxl(void) _INT_CONST_LIBXL(m, SHUTDOWN_REASON_SUSPEND); _INT_CONST_LIBXL(m, SHUTDOWN_REASON_CRASH); _INT_CONST_LIBXL(m, SHUTDOWN_REASON_WATCHDOG); + _INT_CONST_LIBXL(m, SHUTDOWN_REASON_KEXEC); genwrap__init(m); } diff --git a/xen/include/public/sched.h b/xen/include/public/sched.h index a30b11d..6abf225 100644 --- a/xen/include/public/sched.h +++ b/xen/include/public/sched.h @@ -158,7 +158,8 @@ DEFINE_XEN_GUEST_HANDLE(sched_watchdog_t); #define SHUTDOWN_suspend 2 /* Clean up, save suspend info, kill. */ #define SHUTDOWN_crash 3 /* Tell controller we've crashed. */ #define SHUTDOWN_watchdog 4 /* Restart because watchdog time expired. */ -#define SHUTDOWN_MAX 4 /* Maximum valid shutdown reason. */ +#define SHUTDOWN_kexec 5 /* Soft-reboot for kexec. */ +#define SHUTDOWN_MAX 5 /* Maximum valid shutdown reason. */ /* ` } */ #endif /* __XEN_PUBLIC_SCHED_H__ */ -- 1.9.3