Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753999AbbGWSmx (ORCPT ); Thu, 23 Jul 2015 14:42:53 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:36448 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753657AbbGWSmu (ORCPT ); Thu, 23 Jul 2015 14:42:50 -0400 MIME-Version: 1.0 In-Reply-To: References: <20150723115638.0b5dec78@gandalf.local.home> From: Andy Lutomirski Date: Thu, 23 Jul 2015 11:42:29 -0700 Message-ID: Subject: Re: [PATCH 1/5] x86/entry/32: Clean up enable_sep_cpu to prepare for 64-bit merge To: Brian Gerst Cc: Steven Rostedt , Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , Willy Tarreau , Borislav Petkov , Thomas Gleixner , Peter Zijlstra , Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2210 Lines: 57 On Thu, Jul 23, 2015 at 11:33 AM, Andy Lutomirski wrote: > On Thu, Jul 23, 2015 at 11:01 AM, Andy Lutomirski wrote: >> On Thu, Jul 23, 2015 at 10:27 AM, Brian Gerst wrote: >>> On Thu, Jul 23, 2015 at 12:02 PM, Andy Lutomirski wrote: >>>> On Thu, Jul 23, 2015 at 8:56 AM, Steven Rostedt wrote: >>>>> 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? >>>> >>>> Oh... >>>> >>>> Nothing can fault in the wrmsr as far as I know, but maybe there's a >>>> CPU out there that advertises SEP but doesn't have the MSRs. >>>> >>>> Ingo, Thomas, want a v2 that explains that the wrmsr_safe is there for >>>> consistency but that I don't know why 32bit does it? Another option >>>> would be to remove the _safe from the 32-bit version. >>> >>> There is an erratum with SEP being advertised but not available on >>> early P6 models, but we already check for that in the cpu setup code. >>> There shouldn't be a problem with a fault. >> >> I can make a v2 that gets rid of the _safe. >> > > Ugh. wrmsrl_safe is a function but wrmsrl isn't. I'll fix that and send a v2. > > Gah, macros. On third thought, no v2. It's *64-bit* CPUs that might want the _safe. We aren't currently checking SEP. Maybe there's a non-SEP AMD CPU and we never noticed because SEP was never useful on AMD 64-bit CPUs. I'll send a followup. > > --Andy -- Andy Lutomirski AMA Capital Management, LLC -- 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/