Re: [RFC][PATCH 1/2 -mm] kexec based hibernation: kexec jump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux