All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: nigel@nigel.suspend2.net,
	Kexec Mailing List <kexec@lists.infradead.org>,
	linux-kernel@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-pm@lists.linux-foundation.org,
	Jeremy Maitin-Shepard <jbms@cmu.edu>
Subject: Re: [RFC][PATCH 1/2 -mm] kexec based hibernation: kexec jump
Date: Mon, 3 Sep 2007 03:11:45 +0000	[thread overview]
Message-ID: <20070903031145.GF21721@ucw.cz> (raw)
In-Reply-To: <1188548842.1365.13.camel@caritas-dev.intel.com>

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

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel@ucw.cz>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	nigel@nigel.suspend2.net,
	Andrew Morton <akpm@linux-foundation.org>,
	Jeremy Maitin-Shepard <jbms@cmu.edu>,
	linux-kernel@vger.kernel.org,
	linux-pm@lists.linux-foundation.org,
	Kexec Mailing List <kexec@lists.infradead.org>
Subject: Re: [RFC][PATCH 1/2 -mm] kexec based hibernation: kexec jump
Date: Mon, 3 Sep 2007 03:11:45 +0000	[thread overview]
Message-ID: <20070903031145.GF21721@ucw.cz> (raw)
In-Reply-To: <1188548842.1365.13.camel@caritas-dev.intel.com>

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

  reply	other threads:[~2007-09-03  9:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27  1:14 [RFC][PATCH 1/2 -mm] kexec based hibernation: kexec jump Huang, Ying
2007-08-27  1:14 ` Huang, Ying
2007-08-27 18:48 ` Pavel Machek
2007-08-27 18:48   ` Pavel Machek
2007-08-31  8:27   ` Huang, Ying
2007-08-31  8:27   ` Huang, Ying
2007-08-31  8:27     ` Huang, Ying
2007-09-03  3:11     ` Pavel Machek [this message]
2007-09-03  3:11       ` Pavel Machek
2007-09-03  3:11     ` Pavel Machek
2007-08-27 18:48 ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2007-08-27  1:14 Huang, Ying

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070903031145.GF21721@ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=jbms@cmu.edu \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=nigel@nigel.suspend2.net \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.