From: "H. Peter Anvin" <hpa@zytor.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Ingo Molnar <mingo@elte.hu>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
"x86@kernel.org" <x86@kernel.org>,
"yinghai@kernel.org" <yinghai@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Greg KH <gregkh@suse.de>,
"lkml20101129@newton.leun.net" <lkml20101129@newton.leun.net>,
stable kernel team <stable@kernel.org>,
Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>
Subject: Re: [PATCH urgent] x86: Save cr4 to mmu_cr4_features at boot time
Date: Tue, 05 Apr 2011 16:47:06 -0700 [thread overview]
Message-ID: <4D9BA9FA.4010405@zytor.com> (raw)
In-Reply-To: <201104050843.39246.rjw@sisk.pl>
[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]
On 04/04/2011 11:43 PM, Rafael J. Wysocki wrote:
> On Tuesday, April 05, 2011, H. Peter Anvin wrote:
>> On 04/04/2011 11:29 PM, Rafael J. Wysocki wrote:
>>>>
>>>> Peter very consciously did not mark the fix for this commit as -stable
>>>> material. It was ineligible for -stable for multiple reasons: it by no means
>>>> fixed a 2.6.39 regression and the fix was literally just a few days old.
>>>
>>> Has this issue been resolved in the mainline, BTW?
>>>
>>
>> Just to refresh my memory... is this an issue in mainline, or is it only
>> a problem in the backport (I'm wondering if the trampoline unification
>> patches might have accidentally solved the issue)?
>
>
> The problem is in mainline too, please fix ASAP.
>
For the suspend/resume case this seems like the sanest way to fix it in
my opinion. However, I am a bit concerned since I'm still not sure
we're programming registers in the correct order, that is:
MISC_ENABLE -> EFER -> cr4 -> cr3 -> cr0
I will look at this issue later this evening, but I wanted your opinion
on it.
-hpa
[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 599 bytes --]
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 87bb35e..69dbf42 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
@@ -98,13 +98,12 @@ static void __save_processor_state(struct saved_context *ctxt)
ctxt->cr0 = read_cr0();
ctxt->cr2 = read_cr2();
ctxt->cr3 = read_cr3();
-#ifdef CONFIG_X86_32
ctxt->cr4 = read_cr4_safe();
-#else
-/* CONFIG_X86_64 */
- ctxt->cr4 = read_cr4();
+ mmu_cr4_features = ctxt->cr4;
+#ifdef CONFIG_X86_64
ctxt->cr8 = read_cr8();
#endif
+
ctxt->misc_enable_saved = !rdmsrl_safe(MSR_IA32_MISC_ENABLE,
&ctxt->misc_enable);
}
next prev parent reply other threads:[~2011-04-05 23:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 16:38 [PATCH urgent] x86: Save cr4 to mmu_cr4_features at boot time Stefano Stabellini
2011-04-01 6:23 ` Ingo Molnar
2011-04-01 11:30 ` Stefano Stabellini
2011-04-01 18:51 ` H. Peter Anvin
2011-04-01 19:08 ` Ingo Molnar
2011-04-01 20:59 ` [stable] " Greg KH
2011-04-01 22:57 ` Stefano Stabellini
2011-04-04 15:11 ` Ingo Molnar
2011-04-04 15:47 ` Stefano Stabellini
2011-04-04 16:25 ` Ingo Molnar
2011-04-05 6:29 ` Rafael J. Wysocki
2011-04-05 6:37 ` H. Peter Anvin
2011-04-05 6:43 ` Rafael J. Wysocki
2011-04-05 6:55 ` H. Peter Anvin
2011-04-05 23:47 ` H. Peter Anvin [this message]
2011-04-06 4:34 ` Rafael J. Wysocki
2011-04-06 4:45 ` H. Peter Anvin
2011-04-11 23:04 ` Greg KH
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=4D9BA9FA.4010405@zytor.com \
--to=hpa@zytor.com \
--cc=Jeremy.Fitzhardinge@citrix.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml20101129@newton.leun.net \
--cc=mingo@elte.hu \
--cc=rjw@sisk.pl \
--cc=stable@kernel.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=x86@kernel.org \
--cc=yinghai@kernel.org \
/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.