[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130502123438.GD22618@amd.pavel.ucw.cz>
Date: Thu, 2 May 2013 14:34:38 +0200
From: Pavel Machek <pavel@....cz>
To: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
rjw@...k.pl, tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
x86@...nel.org
Subject: Re: [PATCH] x86, x86-64, gdt, hibernate: Store/load GDT for
hibernate path.
Hi!
> 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.
Ok.
> 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.
So the on-disk format changed and we need to bump the version number
somewhere?
I guess we should add big fat warning to the affected structures.
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists