[PATCH 4/8] kexec: add infrastructure for handling kexec images

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

 



On Thu, Feb 21, 2013 at 05:48:10PM +0000, David Vrabel wrote:
> From: David Vrabel <david.vrabel at citrix.com>
>
> Add the code needed to handle and load kexec images into Xen memory or
> into the crash region.  This is needed for the new KEXEC_CMD_load and
> KEXEC_CMD_unload hypercall sub-ops.
>
> Much of this code is derived from the Linux kernel.
>
> Signed-off-by: David Vrabel <david.vrabel at citrix.com>

[...]

> diff --git a/xen/common/kimage.c b/xen/common/kimage.c

[...]

> +static int kimage_load_segment(struct kexec_image *image, xen_kexec_segment_t *segment)
> +{
> +    int result = -ENOMEM;

Somewhere should be a check that arhitecture of loaded image
is compatible with arhitecture on which we currently running.

> +    switch ( image->type )
> +    {
> +    case KEXEC_TYPE_DEFAULT:
> +        result = kimage_load_normal_segment(image, segment);
> +        break;
> +    case KEXEC_TYPE_CRASH:
> +        result = kimage_load_crash_segment(image, segment);
> +        break;
> +    }
> +
> +    return result;
> +}

Daniel



[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