[PATCH 1/2] c/r: [x86_32] sys_restore to use ptregs prototype

Oren Laadan orenl at cs.columbia.edu
Sun Dec 6 14:51:40 PST 2009




Oren Laadan wrote:
> Similar to other select syscalls (fork, clone, execve), sys_restart
> needs to access the pt_regs structure, so that it can modify it to
> restore the original state from the time of the checkpoint.
> 
> (This is less of an issue for x86-32, however is required for those
> architectures that otherwise save/restore partial state (e.g. not all
> registers) during syscall entry/exit, like x86-64.
> 
> This patch prepares to support c/r on x86-64, specifically:
> 
> * Changes the syscall prototype and definition to accept the pt_regs
>   struct as an argument (into %eax register).

I forgot to mention that this of course breaks s390 and ppc: you
need to provide an arch-dependent sys_restart() similar to how it's
done here.

Oren.

> 
> * Move arch/x86/mm/checkpoint*.c to arch/x86/kernel/...
> 
> * Split 32bit-dependent part of arch/x86/kernel/checkpoint.c into a
>   new arch/x86/kernel/checkpoint_32.c
> 
> Signed-off-by: Oren Laadan <orenl at cs.columbia.edu>
> ---



More information about the Containers mailing list