From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: discuss@x86-64.org, pm list <linux-pm@lists.linux-foundation.org>,
Nigel Cunningham <nigel@nigel.suspend2.net>
Subject: Re: [RFC][PATCH -mm 4/4] Hibernation: Pass CR3 value in hibernation header on x86_64
Date: Tue, 21 Aug 2007 10:01:18 +0200 [thread overview]
Message-ID: <20070821080118.GH7258@elf.ucw.cz> (raw)
In-Reply-To: <200708201518.52765.rjw@sisk.pl>
Hi!
> From: Rafael J. Wysocki <rjw@sisk.pl>
>
> Since we already pass the address of restore_registers() in the image header,
> we can also pass the value of the CR3 register from before the hibernation in
> the same way. This will allow us to avoid using init_level4_pgt page tables
> during the restore.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> @@ -283,7 +290,8 @@ int arch_hibernation_header_save(void *a
> if (max_size < sizeof(struct restore_data_record))
> return -EOVERFLOW;
> rdr->jump_address = restore_jump_address;
> - rdr->control = (restore_jump_address ^ RESTORE_MAGIC);
> + rdr->cr3 = restore_cr3;
> + rdr->control = (restore_jump_address ^ (restore_cr3 ^ RESTORE_MAGIC));
> return 0;
Does control want to be renamed as "crc"? Or perphaps we want to just
store MAGIC there, w/o any obfuscation, since obfuscation does not
really buy us anything?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2007-08-21 8:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-20 13:10 [RFC][PATCH -mm 0/4] Hibernation: Arbitrary boot kernel support on x86_64 Rafael J. Wysocki
2007-08-20 13:11 ` [RFC][PATCH -mm 1/4] " Rafael J. Wysocki
2007-08-21 7:57 ` Pavel Machek
2007-08-21 14:37 ` [discuss] " Rafael J. Wysocki
2007-08-21 19:30 ` Rafael J. Wysocki
2007-08-21 20:47 ` Rafael J. Wysocki
2007-08-20 13:16 ` [RFC][PATCH -mm 2/4] Hibernation: Turn on ACPI during restore if necessary Rafael J. Wysocki
2007-08-21 7:57 ` Pavel Machek
2007-08-21 14:39 ` Rafael J. Wysocki
2007-08-21 23:36 ` Pavel Machek
2007-08-22 20:47 ` [discuss] " Rafael J. Wysocki
2007-08-20 13:17 ` [RFC][PATCH -mm 3/4] Hibernation: Use temporary kernel text mapping during restore on x86_64 Rafael J. Wysocki
2007-08-21 7:59 ` Pavel Machek
2007-08-21 14:42 ` Rafael J. Wysocki
2007-08-20 13:18 ` [RFC][PATCH -mm 4/4] Hibernation: Pass CR3 value in hibernation header " Rafael J. Wysocki
2007-08-21 8:01 ` Pavel Machek [this message]
2007-08-21 14:46 ` Rafael J. Wysocki
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=20070821080118.GH7258@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=discuss@x86-64.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=nigel@nigel.suspend2.net \
--cc=rjw@sisk.pl \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox