Received: by 10.223.176.5 with SMTP id f5csp450654wra; Fri, 9 Feb 2018 01:38:29 -0800 (PST) X-Google-Smtp-Source: AH8x2257vn2affu5wuiQnDQ5YVOQIA4kbL8v/zO8vtCEt66DNSW6U+9qxdc7a/b1CFBQmZVzzGQE X-Received: by 10.99.113.11 with SMTP id m11mr1878768pgc.57.1518169109276; Fri, 09 Feb 2018 01:38:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518169109; cv=none; d=google.com; s=arc-20160816; b=WxY1tHR/7OS5q5hVEpZrOtEOVrfEvFpRkBfWECkPZVkKXa66hqQTRWv9sdy1NZXyfY TiawR02islN8+W2y4Mh+t/9vxb223YZtdEE8WW6Ich1r9aZIZ3SDiWCUcec3xZEiE+Iw 5BA4fLHnpdicPRh8IdwMSOnfy51tBmNDh/EBy8tKVWlECYg5ODgTgNg2yKbUqlH05yJj u3lEu02oavHYQpzvcVlyJFM5L7haImHe6WHa8wdHYeFxjRha8aEOQrbdtxoLz8a4tBLd nydgNEwTkivcmG13TcG7qAOrGOdpTW6AABZdFq8XQJ9jEb2ByseG36xXNd6GW0TA1UMO YiTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=qxWeLBWPXfhZcdORXt/N8vBDLLsrpvteBpcTwZSO2Cc=; b=QRTKX/Z2wqZqr1WsIMclTHlz0Lrml4hD35b7dft6l31JIdEVN3/2zSjOLj/iy5MadG eD+xsloMCjZujmQV/dPX5Vm7X0fLDUe5ZONxczdloyrDjRuwbEht4Yblihzz/nmPGLGa xeceH4RFu+WMwP363vVidyaJpcw/lV9uy2yDTsIf9lCmGgvOGCNSY2To2794y0CS06SD 6AfnT8lIDNIckQAxd5E6q9zgI4zgOpRA9lQXFV3cF5NyGK0tO95DQHgsOknhaHO5SbdT EsthoepTiOE/pzQKGrB4ss2SdlwuwnS9HPaj3dTNfQeelkUEGvNpFJDk3fgbQ10xxvM5 hynA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=IgJy5pSi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z16si1142434pge.522.2018.02.09.01.38.11; Fri, 09 Feb 2018 01:38:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=IgJy5pSi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751166AbeBIJgS (ORCPT + 99 others); Fri, 9 Feb 2018 04:36:18 -0500 Received: from 8bytes.org ([81.169.241.247]:43132 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750945AbeBIJZ6 (ORCPT ); Fri, 9 Feb 2018 04:25:58 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id B6144438; Fri, 9 Feb 2018 10:25:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1518168351; bh=g4TGj6ZhBCG7UdO6cOVsWSNI7o+/WUM5q23OGH4nNck=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IgJy5pSi35UbBwDs2b1Zzf1v17J4JWpqNevADCkDIo+0O8Z+YlVvVtRKaCg4tEDGl BASCfFt77v6z2A1PPjPtJuY+m3MjF7fooN/f/QQVyVdjp/3cjn5pqQBehcVri0H3ts /eGPWJ+EzGTR48gsMtMYvaIHWOvX+QxxNe+q2EnDKbJnSmx5ULvQvPD5wBfLDmfQmC gsOsDScpV7iMEhjvS88BQYDN0ZS62qqTGxoC6yt6kmA6cBySyRCRX3LfWnfJkxQloT 33JzYXphtJiKHfGdDwp9nG9h4K7l6x0slL/SYda197djP0K5wvoL5mpoZxYJC9pdUp weMfmrceXqo/A== From: Joerg Roedel To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli , Waiman Long , Pavel Machek , jroedel@suse.de, joro@8bytes.org Subject: [PATCH 05/31] x86/entry/32: Unshare NMI return path Date: Fri, 9 Feb 2018 10:25:14 +0100 Message-Id: <1518168340-9392-6-git-send-email-joro@8bytes.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518168340-9392-1-git-send-email-joro@8bytes.org> References: <1518168340-9392-1-git-send-email-joro@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joerg Roedel NMI will no longer use most of the shared return path, because NMI needs special handling when the CR3 switches for PTI are added. This patch prepares for that. Signed-off-by: Joerg Roedel --- arch/x86/entry/entry_32.S | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S index 0289bde..00ae759 100644 --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -1007,7 +1007,7 @@ ENTRY(nmi) /* Not on SYSENTER stack. */ call do_nmi - jmp .Lrestore_all_notrace + jmp .Lnmi_return .Lnmi_from_sysenter_stack: /* @@ -1018,7 +1018,11 @@ ENTRY(nmi) movl PER_CPU_VAR(cpu_current_top_of_stack), %esp call do_nmi movl %ebx, %esp - jmp .Lrestore_all_notrace + +.Lnmi_return: + CHECK_AND_APPLY_ESPFIX + RESTORE_REGS 4 + jmp .Lirq_return #ifdef CONFIG_X86_ESPFIX32 .Lnmi_espfix_stack: -- 2.7.4