Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757908Ab3GLXgs (ORCPT ); Fri, 12 Jul 2013 19:36:48 -0400 Received: from mailout.scc.kit.edu ([129.13.185.202]:36468 "EHLO mailout.scc.kit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866Ab3GLXgq (ORCPT ); Fri, 12 Jul 2013 19:36:46 -0400 Message-ID: <51E092FC.1030200@student.kit.edu> Date: Sat, 13 Jul 2013 01:36:28 +0200 From: =?UTF-8?B?Q2hyaXN0aWFuIFPDvG5rZW5iZXJn?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130702 Thunderbird/17.0.7 MIME-Version: 1.0 To: "H. Peter Anvin" CC: Jonas Heinrich , "len.brown@intel.com" , "pavel@ucw.cz" , "tglx@linutronix.de" , "mingo@redhat.com" , "x86@kernel.org" , "rjw@sisk.pl" , "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" Subject: Re: [Bisected] 3.7-rc1 can't resume (still present in 3.9) References: <20130218155439.GA902@onny> <20130223131856.GA682@onny> <51293A8B.5060107@zytor.com> <20130320143257.GA473@onny> <20130501170118.GB488@onny> <518151DD.106@zytor.com> <51DDC972.3010005@student.kit.edu> <51DDF4DF.4000902@zytor.com> In-Reply-To: <51DDF4DF.4000902@zytor.com> X-Enigmail-Version: 1.6a1pre Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms060205060604080808000902" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9821 Lines: 174 --------------ms060205060604080808000902 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, On 07/11/2013 01:57 AM, H. Peter Anvin wrote: > On 07/10/2013 01:52 PM, Christian S=C3=BCnkenberg wrote: >> Hello, >> >> On 05/01/2013 07:33 PM, H. Peter Anvin wrote: >>> On 05/01/2013 10:01 AM, Jonas Heinrich wrote: >>>> Hello, I tried the newest kernel, 3.9 today but the bug is still >>>> present. Applying the attached patch solves the bug for me. >>>> >>>> Best regards, Jonas Heinrich >>> >>> Okay... WTF is going on here? Does pmode_behavior just not get set u= p >>> correctly? Since it seems you can get it to wake up with your patch,= >>> perhaps we can get read out the value of pmode_behavior and print it.= =2E. >> >> indeed, arch/x86/kernel/acpi/sleep.c tries an rdmsr_safe(MSR_EFER, ...= ) >> and sets WAKEUP_BEHAVIOR_RESTORE_EFER bit on success, however, >> on 90 nm Pentium M (Family 6, Model 13), reading an invalid MSR >> is not guaranteed to trap, see Erratum X4 in "Intel=C2=AE Pentium=C2=AE= M >> Processor on 90 nm Process with 2-MB L2 Cache and Intel=C2=AE Processo= r A100 >> and A110 on 90 nm process with 512-KB L2 Cache Specification Update". >> On Jonas' T43, which has an affected Pentium M without EFER, >> rdmsr_safe(MSR_EFER, ...) succeeds and WAKEUP_BEHAVIOR_RESTORE_EFER >> gets set, while on resume the corresponding wrmsr traps and thus resum= e >> fails. >> >> The pre-3.7 code snippet incidentally catched this by not restoring >> EFER when it would be restored to all 0s. >> >=20 > That does seem like a reasonable explanation. >=20 > Does this patch fix the problem? (Comment blatantly ripped off from > your email message.) Jonas tried your patch and it fixes suspend/resume on his T43, although IMHO the safest approach would be to just add an exception for Vendor=3D=3DIntel && Family=3D=3D6 && Model=3D=3D13, or more generally Ve= ndor=3D=3DIntel && !supports_long_mode, as the same erratum also warns about wrmsr possibly not triggering a GP either. Anyways, at least on this specific MSR with the Pentium M Jonas tested, it behaved correctly on every try, so I'd say your patch does the trick, thank you very much! As a side note, I found a similar erratum #33 in "Pentium=C2=AE Processor= Specification Update" for Intel P54C (Family 5, Model 2), which would, supposed there are P54C systems with ACPI sleep/resume support, result in MSR 0 (P5_MC_ADDR) to be saved and restored instead of nonexistent EFE= R. Kind regards, Christian --------------ms060205060604080808000902 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="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K 069EEm6uc0OZhkAVKkvTw+TzLUSWN45YrKcwIvARn9HSaBCQ8nJAstncNnT+gmWwASdH95IC Ma2105A1XAn7ECOf425+HmcRDbWYu3WNHNCa3klX098My4QwtFoX3/oq4BNYrsQ2gX6N+1yO QtG59kh9wh3+L5IHEbfnB+Edyaf5Ci5cuLHvHpLCeoJ9LX8KadtE7KPswKs8HlSdpN1T2kmv Asu6QHVquZJDSdpqiERk1sfEFQc2ZhB5avuFcr3K881LXVJ4pKaUnvKLjJBQNDAtwOdKSTG6 DZJfyE+QR2dJgBEG2JT2CUcxJJwCmmcc0/EGsgAAAAAAAA== --------------ms060205060604080808000902-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/