Re: [PATCH 2/3] kexec: Introduce --load-live-update for xen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/1/20 2:47 PM, Simon Horman wrote:
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.



On Fri, Feb 07, 2020 at 10:00:32AM +0100, Varad Gautam wrote:
Xen is intended to expose a KEXEC_TYPE_LIVE_UPDATE operation which
implies a stateful-kexec into a new xen image - or a "live update".
Make kexec-tools capable of triggering a live update.

For a multiboot2 xen image, this will:
- load a xen Elf into into KEXEC_RANGE_MA_XEN
- load purgatory and modules into KEXEC_RANGE_MA_LIVEUPDATE
- append Elf cmdline with " liveupdate=<size>@<addr>

Signed-off-by: Varad Gautam <vrd@xxxxxxxxx>
CC: David Woodhouse <dwmw@xxxxxxxxxxxx>
Sorry for the long delay.

This patch does not appear to compile.

gcc -Wall -Wextra -Wpointer-arith -Wwrite-strings -Wformat -O2 -fomit-frame-pointer -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -I./include -I./util_lib/include -Iinclude/  -I./kexec/arch/x86_64/include  -c -MD -o kexec/kexec.o kexec/kexec.c
kexec/kexec.c: In function ‘my_shutdown’:
kexec/kexec.c:889:3: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    "shutdown",
    ^~~~~~~~~~
kexec/kexec.c:890:3: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    "-r",
    ^~~~
kexec/kexec.c:891:3: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
    "now",
    ^~~~~
kexec/kexec.c: In function ‘cmdline_add_liveupdate’:
kexec/kexec.c:1187:2: warning: implicit declaration of function ‘xen_get_kexec_range’; did you mean ‘xen_kexec_status’? [-Wimplicit-function-declaration]
   xen_get_kexec_range(KEXEC_RANGE_MA_LIVEUPDATE, &lu_start, &lu_end);
   ^~~~~~~~~~~~~~~~~~~
   xen_kexec_status
kexec/kexec.c:1187:22: error: ‘KEXEC_RANGE_MA_LIVEUPDATE’ undeclared (first use in this function)
   xen_get_kexec_range(KEXEC_RANGE_MA_LIVEUPDATE, &lu_start, &lu_end);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~
kexec/kexec.c:1187:22: note: each undeclared identifier is reported only once for each function it appears in
kexec/kexec.c: In function ‘main’:
kexec/kexec.c:1433:37: error: ‘KEXEC_LIVE_UPDATE’ undeclared (first use in this function); did you mean ‘KEXEC_LOADED_PATH’?
             KEXEC_PRESERVE_CONTEXT : KEXEC_LIVE_UPDATE;
                                      ^~~~~~~~~~~~~~~~~
                                      KEXEC_LOADED_PATH


I see, the symbols I added are hidden behind HAVE_LIBXENCTRL, and I'm able to compile with --with-xen=yes without this happening: https://paste.opensuse.org/67739589 .

I'll rework this to work on both xen and non-xen setups and send again.


Varad

kexec/kexec.c:1374:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
     kexec_debug = 1;
     ~~~~~~~~~~~~^~~
kexec/kexec.c:1375:3: note: here
    case OPT_NOIFDOWN:
    ^~~~
make: *** [Makefile:114: kexec/kexec.o] Error 1





Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879


_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux