Messages in this thread | | | Date | Mon, 3 Sep 2007 03:11:45 +0000 | From | Pavel Machek <> | Subject | Re: [RFC][PATCH 1/2 -mm] kexec based hibernation: kexec jump |
| |
Hi!
> > > @@ -94,6 +94,10 @@ > > > unsigned long start_address, > > > unsigned int has_pae) ATTRIB_NORET; > > > > > > +#ifdef CONFIG_KEXEC_JUMP > > > +extern asmlinkage int machine_kexec_real_jump(void *buf); > > > +#endif > > > > Is it really neccessery to have ifdef here? > > It is not necessary. I will fix it in the next version.
Looking forward to next version :-).
> > > +#define CR3 0x18 > > > +#define CR4 0x1c > > > +#define FLAG 0x20 > > > +#define RET 0x24 > > > > Hmm, is this enough? Should it use struct ptregs for normal registers? > > What about segment registers -- they could change between kernel > > version. Should some kind of 'version of kjump protocol' be > > introduced? > > All "preserve" registers defined in ABI are saved, I think that is > sufficient. The "swsusp_arch_suspend" saves only these registers too. > > An extensible inter-kernel kjump protocol and corresponding version > number seems sensible. I will work on this.
Ok, perhaps that can wait after initial merge.
> > What about CX/DX/fpu state? GDT pointer? > > > > Actually I think that you _do_ need to save FPU. You should probably > > use relevant swsusp parts here. > > Before and after "machine_kexec_jump" is called, the > save_processor_state() and restore_processor_state() are called, where > the MTRR/FPU/GDT/IDT/TR/segments/cr are saved and restored. These two > functions come from swsusp. Thanks swsusp guys. :)
So I'm blind. Sorry for the noise. Pavel
-- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |