summaryrefslogtreecommitdiffstats
path: root/purgatory
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2006-10-06 12:27:59 +0900
committerSimon Horman <horms@verge.net.au>2006-10-06 12:46:17 +0900
commit16ec25bd77ba2c4ff1793bd588d5c87fc310485e (patch)
treebda528028de8f6b98dc42448e6d1f56bd416e4b0 /purgatory
parente90343c521b68237c17ea4e4ed376c4a726f0789 (diff)
downloadkexec-tools-16ec25bd77ba2c4ff1793bd588d5c87fc310485e.tar.gz
ia64-vmm
This adds vmm support to kexec-tool for ia64. This is annalogous to the same feature that is present in the latest version of elilo. It is a method of booting a vmm (hypervisor) such as Xen. Essentially it works as follows. * If the --vmm argument is not provided, then the kernel is booted as normal, no changes * Else, the image specified by --vmm is placed loaded into the elf segments, where the Linux kernel image would otherwise have gone. And the Linux kernel image, allong with its length is loaded into a seprate segment, and passed as new entry at the end of the boot parameters. This is somewhat similar to how initramfs/initramd images are passed to a booting kernel, and can work in conjunction with that feature. On boot (or in this case on kexec) the vmm (hypervisor) will be loaded instead of a Linux kernel, and the hypervisor will then load up the Linux kernel as it sees fit. This is needed in order for kexec from Xen to Xen, using the port of kexec to Xen that I am working on, to work. I am not entirely fond of this design, and i think that developing an ia64 variant of multiboot would be much nicer. However it is an existing method that is currently in widespread use through its incarntation in elilo. And if multiboot is added in future, it can be done as a separate boot method, and thus orthogonal to this patch. In order to use this code a number of other changes are needed, in particular: 1. Xen and the corresponding Linux Kernel needs to be patched with the port of kexec to ia64-xen that I have been working on. I will post the latest version of these patches to xen-devel shortly. 2. The currently hardcoded PAGE_OFFSET value in purgatory needs to be changed from the Linux value to the Xen value. I will post a very hackish, definately not to be released, patch after this patch which includes a comment that explains this problem more clearly. Also, xen->linux and linux->xen is still very much work in progress due to the problem described at the following link http://permalink.gmane.org/gmane.linux.ports.ia64/14995 However, from an infastructure point of view I think it would be good to apply this code, so that kexec-tool is one step closer to being able to support vmms (hypervisors). The patch does not alter any existing behaviour, it just adds a new feature. Bugs asside, the only real danger seems to be confusion for end-users, perhaps we could comment out the help text to hide the feature from the lay user, or attach a big fat warning to it. Signed-Off-By: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'purgatory')
-rw-r--r--purgatory/arch/ia64/entry.S4
-rw-r--r--purgatory/arch/ia64/purgatory-ia64.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/purgatory/arch/ia64/entry.S b/purgatory/arch/ia64/entry.S
index 2cc8302e..f05434f1 100644
--- a/purgatory/arch/ia64/entry.S
+++ b/purgatory/arch/ia64/entry.S
@@ -42,7 +42,7 @@ purgatory_start:
alloc r2 = ar.pfs, 0, 0, 2, 0
;;
mov out0=r28
- movl out1=__ramdisk_base;;
+ movl out1=__vmcode_base;
br.call.sptk.many b0=ia64_env_setup
movl r10=__kernel_entry;;
ld8 r14=[r10];;
@@ -57,6 +57,8 @@ purgatory_start:
.endp purgatory_start
DECLARE_DATA8(__kernel_entry)
+DECLARE_DATA8(__vmcode_base)
+DECLARE_DATA8(__vmcode_size)
DECLARE_DATA8(__ramdisk_base)
DECLARE_DATA8(__ramdisk_size)
DECLARE_DATA8(__command_line)
diff --git a/purgatory/arch/ia64/purgatory-ia64.c b/purgatory/arch/ia64/purgatory-ia64.c
index 312cdcca..bd549468 100644
--- a/purgatory/arch/ia64/purgatory-ia64.c
+++ b/purgatory/arch/ia64/purgatory-ia64.c
@@ -106,6 +106,9 @@ struct ia64_boot_param {
the fpswa interface */
uint64_t initrd_start;
uint64_t initrd_size;
+
+ uint64_t vmcode_start;
+ uint64_t vmcode_size;
};
typedef struct {
@@ -124,6 +127,8 @@ struct loaded_segment {
};
struct kexec_boot_params {
+ uint64_t vmcode_base;
+ uint64_t vmcode_size;
uint64_t ramdisk_base;
uint64_t ramdisk_size;
uint64_t command_line;
@@ -275,6 +280,8 @@ ia64_env_setup(struct ia64_boot_param *boot_param,
new_boot_param->console_info.orig_y = 0;
new_boot_param->initrd_start = params->ramdisk_base;
new_boot_param->initrd_size = params->ramdisk_size;
+ new_boot_param->vmcode_start = params->vmcode_base;
+ new_boot_param->vmcode_size = params->vmcode_size;
}
/* This function can be used to execute after the SHA256 verification. */