1
0
Files
linux/arch/x86/include/asm
Konrad Rzeszutek Wilk cc456c4e7c x86, gdt, hibernate: Store/load GDT for hibernate path.
The git commite7a5cd063c7b4c58417f674821d63f5eb6747e37
("x86-64, gdt: Store/load GDT for ACPI S3 or hibernate/resume path
is not needed.") assumes that for the hibernate path the booting
kernel and the resuming kernel MUST be the same. That is certainly
the case for a 32-bit kernel (see check_image_kernel and
CONFIG_ARCH_HIBERNATION_HEADER config option).

However for 64-bit kernels it is OK to have a different kernel
version (and size of the image) of the booting and resuming kernels.
Hence the above mentioned git commit introduces an regression.

This patch fixes it by introducing a 'struct desc_ptr gdt_desc'
back in the 'struct saved_context'. However instead of having in the
'save_processor_state' and 'restore_processor_state' the
store/load_gdt calls, we are only saving the GDT in the
save_processor_state.

For the restore path the lgdt operation is done in
hibernate_asm_[32|64].S in the 'restore_registers' path.

The apt reader of this description will recognize that only 64-bit
kernels need this treatment, not 32-bit. This patch adds the logic
in the 32-bit path to be more similar to 64-bit so that in the future
the unification process can take advantage of this.

[ hpa: this also reverts an inadvertent on-disk format change ]

Suggested-by: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Link: http://lkml.kernel.org/r/1367459610-9656-2-git-send-email-konrad.wilk@oracle.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-05-02 11:27:35 -07:00
..
2011-08-29 13:44:12 -07:00
2012-11-29 13:23:02 -08:00
2012-03-28 18:11:12 +01:00
2012-09-19 17:26:08 +02:00
2012-03-28 18:11:12 +01:00
2013-04-25 10:39:04 +02:00
2012-11-14 15:28:11 -08:00
2011-05-02 17:24:48 +02:00
2012-03-28 18:11:12 +01:00
2013-02-14 09:21:17 -05:00
2012-11-29 13:23:02 -08:00
2011-04-18 09:26:48 -07:00
2012-03-20 21:48:30 +08:00
2013-02-03 18:16:27 -05:00
2012-06-25 13:48:30 +02:00
2011-07-22 14:39:50 +09:30
2012-11-29 13:23:02 -08:00
2012-01-26 21:23:53 +01:00
2013-04-02 16:03:32 -07:00
2013-04-02 16:03:29 -07:00
2013-04-02 10:12:55 -07:00
2011-08-29 13:44:12 -07:00
2012-02-20 12:52:05 -08:00
2013-02-03 18:16:27 -05:00
2012-03-28 18:11:12 +01:00
2013-03-03 23:00:34 -05:00
2012-03-28 18:11:12 +01:00
2011-06-05 21:30:32 +02:00
2012-09-21 17:18:44 -07:00