Re: [PATCH] kexec based hibernation: a prototype of kexec multi-stage load

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Vivek Goyal
Date: Thursday, May 15, 2008 - 8:27 pm

On Fri, May 16, 2008 at 10:56:15AM +0800, Huang, Ying wrote:

Huang is making use of purgatory only for booting kernel B for the first
time. Once the kernel B is booted, all the trasitions (A-->B and B<--A)
happen without using purgatory. Just keep on jumping back and forth
to "kexec_jump_back_entry".

Probably not using purgatory for later transitions is justified as long as
kernel code is simple and small. Otherwise we will shall have to teach
purgatory also of special case of resuming kernel B or booting kernel B.


To me this idea also looks good. So control flow will look something
as follows?

relocate_new kernel:
	
	if (!preserve_context)
		set registers to known state.
		jump to purgatory.
	else
		goto jump-back-setup:

jump-back-setup:
- Color the stack.
  move $0xffffffff 0(%esp)

- call %edx

kexec_jump_back_entry:

- If 0 (%esp) is not -1
	image->start = 0(%esp)  //Re entry point of kernel B. Store it.
  else
	We returned from BIOS call. Re-entry point has not changed
        Do nothing.

- Continue to resume kernel A

Thanks
Vivek
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Eric W. Biederman, (Wed May 14, 2:43 pm)
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Eric W. Biederman, (Thu May 15, 11:39 am)
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Eric W. Biederman, (Thu May 15, 7:25 pm)
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Eric W. Biederman, (Thu May 15, 7:55 pm)
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Vivek Goyal, (Thu May 15, 8:27 pm)
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Eric W. Biederman, (Thu May 15, 8:33 pm)
Re: [PATCH] kexec based hibernation: a prototype of kexec ..., Eric W. Biederman, (Sat May 17, 6:59 pm)