|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3] kexec: implemented XEN KEXEC STATUS to determine if an image is loaded
On 01/24/2017 01:16 PM, Daniel Kiper wrote: On Tue, Jan 24, 2017 at 12:55:35PM -0600, Eric DeVolder wrote:Instead of the scripts having to poke at various fields we can provide that functionality via the -S parameter. kexec_loaded/kexec_crash_loaded exposes Linux kernel kexec/crash state. It does not say anything about Xen kexec/crash state. So, we need a special approach to get the latter. Though for compatibility we provide similar functionality in kexec-tools for the former. This change enables the --status or -S option to work either with or without Xen. Returns 0 if the payload is loaded. Can be used in combination with -l or -p to get the state of the proper kexec image. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Signed-off-by: Eric DeVolder <eric.devolder@xxxxxxxxxx> --- Note: The corresponding Xen changes have been committed to the Xen staging branch. Follow this thread: https://lists.xenproject.org/archives/html/xen-devel/2017-01/msg01570.html CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: kexec@xxxxxxxxxxxxxxxxxxx CC: xen-devel@xxxxxxxxxxxxxxxxxxxx CC: Daniel Kiper <daniel.kiper@xxxxxxxxxx> v0: First version (internal product). v1: Posted on kexec mailing list. Changed -s to -S v2: Incorporated feedback from kexec mailing list, posted on kexec mailing list v3: Incorporated feedback from kexec mailing list --- configure.ac | 8 ++++++- kexec/kexec-xen.c | 26 +++++++++++++++++++++++ kexec/kexec.8 | 6 ++++++ kexec/kexec.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++------- kexec/kexec.h | 5 ++++- 5 files changed, 98 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 3044185..c6e864b 100644 --- a/configure.ac +++ b/configure.ac @@ -165,8 +165,14 @@ fi dnl find Xen control stack libraries if test "$with_xen" = yes ; then AC_CHECK_HEADER(xenctrl.h, - [AC_CHECK_LIB(xenctrl, xc_kexec_load, , + [AC_CHECK_LIB(xenctrl, xc_kexec_load, [ have_xenctrl_h=yes ], AC_MSG_NOTICE([Xen support disabled]))]) +if test "$have_xenctrl_h" = yes ; then + AC_CHECK_LIB(xenctrl, xc_kexec_status, + AC_DEFINE(HAVE_KEXEC_CMD_STATUS, 1, + [The kexec_status call is available]), + AC_MSG_NOTICE([The kexec_status call is not available])) +fi It is possible to relocate kexec_loaded() so that the forward declaration is not needed. I will do so. eric _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |