Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751361AbeAEEyg (ORCPT + 1 other); Thu, 4 Jan 2018 23:54:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:56320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260AbeAEEyc (ORCPT ); Thu, 4 Jan 2018 23:54:32 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EBD421A1A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org X-Google-Smtp-Source: ACJfBouFosPJONKnLg7rBHaG+u7OlCTtVSdTsxzBzpvA8HAgg2fZVm4o/KTvqes13PnR5/8k7CyJu+yOfVP1+DIBPdw= MIME-Version: 1.0 In-Reply-To: References: <032e71e3826ed92523e9070fffa7108392848dc6.1515086770.git.tim.c.chen@linux.intel.com> <20180104221645.GC32035@hirez.programming.kicks-ass.net> <7fe03060-3904-dcf7-3cdf-a98ade5f5148@linux.intel.com> From: Andy Lutomirski Date: Thu, 4 Jan 2018 20:54:10 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/7] x86/enter: MACROS to set/clear IBRS To: Dave Hansen Cc: Tim Chen , Peter Zijlstra , Thomas Gleixner , Andy Lutomirski , Linus Torvalds , Greg KH , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 4, 2018 at 2:23 PM, Dave Hansen wrote: > On 01/04/2018 02:21 PM, Tim Chen wrote: >>> Does this really have to live outside of arch/x86/entry/ ? >>> >> There are some inline C routines later in this file >> that will be needed by other functions. Want to consolidate >> them in the same file. > > We could put all of the assembly into calling.h along with the PTI > assembly. Seems as sane a place as anywhere else to put it. > We should also stop thinking that NMI is at all special. All the paranoid entry paths + NMI should just save and restore it, just like CR3. Otherwise we get nasty corner cases with MCE, kprobes, etc.