This is identical to the default case... for now.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
return 0;
}
+#ifdef CONFIG_LIVE_UPDATE
+static long kexec_live_update(void *_image)
+{
+ struct kexec_image *image = _image;
+
+ kexecing = TRUE;
+
+ kexec_common_shutdown();
+ machine_reboot_kexec(image);
+
+ BUG();
+ return 0;
+}
+#endif /* CONFIG_LIVE_UPDATE */
+
static void do_crashdump_trigger(unsigned char key)
{
printk("'%c' pressed -> triggering crashdump\n", key);
switch ( type )
{
case KEXEC_TYPE_DEFAULT:
+#ifdef CONFIG_LIVE_UPDATE
+ case KEXEC_TYPE_LIVE_UPDATE:
+#endif
*base = KEXEC_IMAGE_DEFAULT_BASE;
*bit = KEXEC_FLAG_DEFAULT_POS;
break;
image = kexec_image[base + pos];
ret = continue_hypercall_on_cpu(0, kexec_reboot, image);
break;
+#ifdef CONFIG_LIVE_UPDATE
+ case KEXEC_TYPE_LIVE_UPDATE:
+ image = kexec_image[base + pos];
+ ret = continue_hypercall_on_cpu(0, kexec_live_update, image);
+ break;
+#endif
case KEXEC_TYPE_CRASH:
kexec_crash(); /* Does not return */
break;
switch ( image->type )
{
case KEXEC_TYPE_DEFAULT:
+ case KEXEC_TYPE_LIVE_UPDATE:
pages = kimage_alloc_normal_control_page(image, memflags);
break;
case KEXEC_TYPE_CRASH:
switch ( image->type )
{
case KEXEC_TYPE_DEFAULT:
+ case KEXEC_TYPE_LIVE_UPDATE:
result = kimage_load_normal_segment(image, segment);
break;
case KEXEC_TYPE_CRASH:
switch( type )
{
case KEXEC_TYPE_DEFAULT:
+ case KEXEC_TYPE_LIVE_UPDATE:
result = kimage_normal_alloc(rimage, entry_maddr, nr_segments, segment);
break;
case KEXEC_TYPE_CRASH:
*/
/*
- * 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 guest-transparent 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_LIVE_UPDATE 2
/* The kexec implementation for Xen allows the user to load two
* types of kernels, KEXEC_TYPE_DEFAULT and KEXEC_TYPE_CRASH.