Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753993AbbGWP4v (ORCPT ); Thu, 23 Jul 2015 11:56:51 -0400 Received: from smtprelay0191.hostedemail.com ([216.40.44.191]:36417 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753453AbbGWP4n (ORCPT ); Thu, 23 Jul 2015 11:56:43 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2553:2559:2562:3138:3139:3140:3141:3142:3353:3622:3865:3867:3868:3870:3871:3872:3873:3874:4321:4362:4605:5007:6119:6261:7875:7903:8660:9040:10004:10400:10848:10967:11026:11232:11473:11657:11658:11914:12043:12296:12438:12517:12519:12555:12740:13069:13138:13148:13230:13231:13255:13311:13357:14093:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: fold12_917e44698181a X-Filterd-Recvd-Size: 2804 Date: Thu, 23 Jul 2015 11:56:38 -0400 From: Steven Rostedt To: Andy Lutomirski Cc: X86 ML , linux-kernel@vger.kernel.org, Willy Tarreau , Borislav Petkov , Thomas Gleixner , Peter Zijlstra , Linus Torvalds Subject: Re: [PATCH 1/5] x86/entry/32: Clean up enable_sep_cpu to prepare for 64-bit merge Message-ID: <20150723115638.0b5dec78@gandalf.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1876 Lines: 54 On Thu, 23 Jul 2015 08:31:39 -0700 Andy Lutomirski wrote: > Switch from wrmsr to wrmsrl_safe to prepare to merge the 32-bit and > 64-bit code, and use __KERNEL_CS explicitly to initialize > MSR_IA32_SYSENTER_CS. While we're at it, tweak the whitespace a > bit. Saying "prepare to merge the 32-bit and 64-bit" isn't that informative to why this patch is needed. Can you please describe in the change log what can fault with the wrmsr call, when we do the merge? Thanks! -- Steve > > Signed-off-by: Andy Lutomirski > --- > arch/x86/kernel/cpu/common.c | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > > diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c > index 922c5e0cea4c..9b3a43583f81 100644 > --- a/arch/x86/kernel/cpu/common.c > +++ b/arch/x86/kernel/cpu/common.c > @@ -1001,15 +1001,13 @@ void enable_sep_cpu(void) > * We cache MSR_IA32_SYSENTER_CS's value in the TSS's ss1 field -- > * see the big comment in struct x86_hw_tss's definition. > */ > - > tss->x86_tss.ss1 = __KERNEL_CS; > - wrmsr(MSR_IA32_SYSENTER_CS, tss->x86_tss.ss1, 0); > - > - wrmsr(MSR_IA32_SYSENTER_ESP, > - (unsigned long)tss + offsetofend(struct tss_struct, SYSENTER_stack), > - 0); > > - wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long)entry_SYSENTER_32, 0); > + wrmsrl_safe(MSR_IA32_SYSENTER_CS, __KERNEL_CS); > + wrmsrl_safe(MSR_IA32_SYSENTER_ESP, > + (unsigned long)tss + > + offsetofend(struct tss_struct, SYSENTER_stack)); > + wrmsrl_safe(MSR_IA32_SYSENTER_EIP, (unsigned long)entry_SYSENTER_32); > > out: > put_cpu(); -- 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/