On Thu, 2021-05-06 at 11:42 +0100, Julien Grall wrote:
> From: Julien Grall <jgr...@amazon.com>
> 
> Unfortunately, the code to support Live Update has already been
> merged in
> Kexec and shipped since 2.0.21. Reserve the IDs used by Kexec before
> they
> end up to be re-used for a different purpose.
> 
> This patch reserves two IDs:
>     * KEXEC_TYPE_LIVEUPDATE: New operation to request Live Update
>     * KEXEC_MA_RANGE_LIVEUPDATE: New range to query the Live Update
>       area below Xen
> 
> Signed-off-by: Julien Grall <jgr...@amazon.com>

Reviewed-by: Hongyan Xia <hongy...@amazon.com>

> ---
>  xen/include/public/kexec.h | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/include/public/kexec.h b/xen/include/public/kexec.h
> index 3f2a118381ba..650d2feb036f 100644
> --- a/xen/include/public/kexec.h
> +++ b/xen/include/public/kexec.h
> @@ -71,17 +71,22 @@
>   */
>  
>  /*
> - * Kexec supports two types of operation:
> + * Kexec supports three types of operation:
>   * - kexec into a regular kernel, very similar to a standard reboot
>   *   - KEXEC_TYPE_DEFAULT is used to specify this type
>   * - kexec into a special "crash kernel", aka kexec-on-panic
>   *   - KEXEC_TYPE_CRASH is used to specify this type
>   *   - parts of our system may be broken at kexec-on-panic time
>   *     - the code should be kept as simple and self-contained as
> possible
> + * - Live update into a new Xen, preserving all running domains
> + *   - KEXEC_TYPE_LIVE_UPDATE is used to specify this type
> + *   - Xen performs non-cooperative live migration and stores live
> + *     update state in memory, passing it to the new Xen.
>   */
>  
> -#define KEXEC_TYPE_DEFAULT 0
> -#define KEXEC_TYPE_CRASH   1
> +#define KEXEC_TYPE_DEFAULT      0
> +#define KEXEC_TYPE_CRASH        1
> +#define KEXEC_TYPE_LIVEUPDATE   2
>  
>  
>  /* The kexec implementation for Xen allows the user to load two
> @@ -150,6 +155,8 @@ typedef struct xen_kexec_load_v1 {
>  #define KEXEC_RANGE_MA_EFI_MEMMAP 5 /* machine address and size of
>                                       * of the EFI Memory Map */
>  #define KEXEC_RANGE_MA_VMCOREINFO 6 /* machine address and size of
> vmcoreinfo */
> +/* machine address and size of the Live Update area below Xen */
> +#define KEXEC_RANGE_MA_LIVEUPDATE 7

Very nit: I tend to say "right below" Xen, since below sounds like it
could be anywhere. In the design doc we also said "just below".

Hongyan


Reply via email to