From patchwork Fri Nov 1 17:34:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babu Moger X-Patchwork-Id: 11223469 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3AA6717D5 for ; Fri, 1 Nov 2019 17:34:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06BD3217F9 for ; Fri, 1 Nov 2019 17:34:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="3p9p1xUy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729394AbfKAReG (ORCPT ); Fri, 1 Nov 2019 13:34:06 -0400 Received: from mail-eopbgr820042.outbound.protection.outlook.com ([40.107.82.42]:34496 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729138AbfKAReF (ORCPT ); Fri, 1 Nov 2019 13:34:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N14tV5hKaVRPsDzR6dtkZ+a3ghr3542h1dxWpewTPPSOxHbGlSiyEW+iQLi7yn/IpejZJLgu1CWeqUYx3WEmyDkPDRrJK0GyD+LydpXUy2F8b0lprq6gSRkDkTbo2Aq/TOSu2EqHxhFG0cyT0dpF7JnYDTlYiyMwI4HsAChldwSxDyHwIXsZ25FC/tZhJdtFuOS6vETDStLEE0ewVlxd3NGLZ+h+v40BW2uh3bb00qrK0jmaUkekoJUiHzWadsVcW1dXO7ggF5McGWCcQIBZwK/Nr2Q8HIfarnl4M+HOIcO9mOq4g+OKjO+mXgY6ifNfSiVfXQxqN5PL3eeTgcnk5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ukvZmZHoEw0wxITAiKHm0gtuQ6hWeOC+/X77rDtK+xM=; b=Z0/8+l/TcAqpzedTLXaFnuOpQI1wsB+u4lPzjm66sai30Ae9QBi0vT1xW+Gt0dDJpOhGnpx/aK+s7B+wLvtGSEYVpVlg1m1kPxjV2GqEBjCU48YV23q5W+N9rIbsyNXS/YX7AS3J5R9bws6cmbzFUNNBSlEixnLsPlingzlKSu6JKm23huwuW55EE09haUt3ECuVhZy0RfI3IuoZQdhLCpHtmkK8glhb4Dj8KvRDBdFwMdZGfvMmoO5AXP5njzd3v1PBb5CZzHFkvWKV7D7g3HGgJ4KJpukUHz5371w+hmvNoX9IBKY9uI4zKMejYxno4sfoPi03L/95euSK40s/2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ukvZmZHoEw0wxITAiKHm0gtuQ6hWeOC+/X77rDtK+xM=; b=3p9p1xUy9qHyjoFVNMU6tufOUHMdWGfEQxsvH2mY7/kjHvYwehVVk3NhAuGrCOcFuYHAF1Sax2/XX8zK32yKHw9DZcy63hCA5WyFDUI+jc1SYLcjyN05rdrLKQt7oZJNTyDfq56ipM302tardWOw1AkWBYxfbyxGzgt/pXJc8ts= Received: from BL0PR12MB2468.namprd12.prod.outlook.com (52.132.30.157) by BL0PR12MB2451.namprd12.prod.outlook.com (52.132.11.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.24; Fri, 1 Nov 2019 17:34:01 +0000 Received: from BL0PR12MB2468.namprd12.prod.outlook.com ([fe80::748c:1f32:1a4d:acca]) by BL0PR12MB2468.namprd12.prod.outlook.com ([fe80::748c:1f32:1a4d:acca%7]) with mapi id 15.20.2387.028; Fri, 1 Nov 2019 17:34:00 +0000 From: "Moger, Babu" To: "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "hpa@zytor.com" , "pbonzini@redhat.com" , "rkrcmar@redhat.com" , "sean.j.christopherson@intel.com" , "vkuznets@redhat.com" , "wanpengli@tencent.com" , "jmattson@google.com" CC: "x86@kernel.org" , "joro@8bytes.org" , "Moger, Babu" , "luto@kernel.org" , "zohar@linux.ibm.com" , "yamada.masahiro@socionext.com" , "nayna@linux.ibm.com" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" Subject: [PATCH 4/4] x86/Kconfig: Rename UMIP config parameter Thread-Topic: [PATCH 4/4] x86/Kconfig: Rename UMIP config parameter Thread-Index: AQHVkNqMYpA3/AJr/06gaFyuP7Wa9g== Date: Fri, 1 Nov 2019 17:34:00 +0000 Message-ID: <157262963852.2838.14488338442051597577.stgit@naples-babu.amd.com> References: <157262960837.2838.17520432516398899751.stgit@naples-babu.amd.com> In-Reply-To: <157262960837.2838.17520432516398899751.stgit@naples-babu.amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN4PR0501CA0002.namprd05.prod.outlook.com (2603:10b6:803:40::15) To BL0PR12MB2468.namprd12.prod.outlook.com (2603:10b6:207:44::29) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Babu.Moger@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.78.2] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 8dab568a-25a6-4fe0-ee76-08d75ef1aea3 x-ms-traffictypediagnostic: BL0PR12MB2451: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 020877E0CB x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(376002)(366004)(346002)(39860400002)(396003)(136003)(189003)(199004)(8936002)(4326008)(54906003)(186003)(478600001)(64756008)(11346002)(66066001)(14454004)(7416002)(476003)(86362001)(316002)(486006)(71190400001)(99286004)(256004)(2906002)(14444005)(76176011)(81156014)(71200400001)(110136005)(8676002)(66556008)(66446008)(52116002)(102836004)(3846002)(386003)(2501003)(81166006)(5660300002)(6506007)(66476007)(66946007)(6436002)(6512007)(6486002)(6116002)(26005)(446003)(103116003)(2201001)(305945005)(25786009)(7736002)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:BL0PR12MB2451;H:BL0PR12MB2468.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dkNn2meK8hqMQ4HzHK+ivvauecgozFJE/Hznr6Dbj/Q0hdTXz9rD86mzV2fRnDiRfl+U5y7/cjHa8G4+gCoG54fyw2RJP4PN/3dwLdVUtanCmuTQK4NjJuTRPj6e+H9CS1of1nK9sp+r7xIMdJcFm+fRPc0JrhUPRrP7lJIYHSK0ksDlGJQZgnPGKOoeL7fOYJOTKOOkYU5GVCaUQia8GdWJuPmSICOu+RLhd9eejIZ3Wz527kqxnK38U17G/PF0xDNHhJJ3Sv9eLrm8IdZk2tfjnS81C42ijWDUqYLC+7/CLQUej9D5ODPAyFTqW7x5TT3adoRKxkaaaem5qZeGSeHgbnP7r0neaB67kj5daR2Dprx9iUFo69YTDG/Lh8qmkqOlBnpK/mMCLbADa5rkR1NkBIRWwN+9CyZKHR5H1964SyqmEXNqN06DuaOi71VB Content-ID: <682AA788FAC95F4EBD8959531CF1B4AE@namprd12.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8dab568a-25a6-4fe0-ee76-08d75ef1aea3 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Nov 2019 17:34:00.8051 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: I354mym5Nu81hx9+jy50o0B4eKQrj9Yg2JNaq74tGz7UEmMqTOvE8mQE/xzxAO8m X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2451 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org AMD 2nd generation EPYC processors support the UMIP (User-Mode Instruction Prevention) feature. So, rename X86_INTEL_UMIP to generic X86_UMIP and modify the text to cover both Intel and AMD. Signed-off-by: Babu Moger --- arch/x86/Kconfig | 8 ++++---- arch/x86/include/asm/disabled-features.h | 2 +- arch/x86/include/asm/umip.h | 4 ++-- arch/x86/kernel/Makefile | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index d6e1faa28c58..821b7cebff31 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1880,13 +1880,13 @@ config X86_SMAP If unsure, say Y. -config X86_INTEL_UMIP +config X86_UMIP def_bool y - depends on CPU_SUP_INTEL - prompt "Intel User Mode Instruction Prevention" if EXPERT + depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD) + prompt "User Mode Instruction Prevention" if EXPERT ---help--- The User Mode Instruction Prevention (UMIP) is a security - feature in newer Intel processors. If enabled, a general + feature in newer x86 processors. If enabled, a general protection fault is issued if the SGDT, SLDT, SIDT, SMSW or STR instructions are executed in user mode. These instructions unnecessarily expose information about the hardware state. diff --git a/arch/x86/include/asm/disabled-features.h b/arch/x86/include/asm/disabled-features.h index a5ea841cc6d2..8e1d0bb46361 100644 --- a/arch/x86/include/asm/disabled-features.h +++ b/arch/x86/include/asm/disabled-features.h @@ -22,7 +22,7 @@ # define DISABLE_SMAP (1<<(X86_FEATURE_SMAP & 31)) #endif -#ifdef CONFIG_X86_INTEL_UMIP +#ifdef CONFIG_X86_UMIP # define DISABLE_UMIP 0 #else # define DISABLE_UMIP (1<<(X86_FEATURE_UMIP & 31)) diff --git a/arch/x86/include/asm/umip.h b/arch/x86/include/asm/umip.h index db43f2a0d92c..aeed98c3c9e1 100644 --- a/arch/x86/include/asm/umip.h +++ b/arch/x86/include/asm/umip.h @@ -4,9 +4,9 @@ #include #include -#ifdef CONFIG_X86_INTEL_UMIP +#ifdef CONFIG_X86_UMIP bool fixup_umip_exception(struct pt_regs *regs); #else static inline bool fixup_umip_exception(struct pt_regs *regs) { return false; } -#endif /* CONFIG_X86_INTEL_UMIP */ +#endif /* CONFIG_X86_UMIP */ #endif /* _ASM_X86_UMIP_H */ diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 3578ad248bc9..52ce1e239525 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -134,7 +134,7 @@ obj-$(CONFIG_EFI) += sysfb_efi.o obj-$(CONFIG_PERF_EVENTS) += perf_regs.o obj-$(CONFIG_TRACING) += tracepoint.o obj-$(CONFIG_SCHED_MC_PRIO) += itmt.o -obj-$(CONFIG_X86_INTEL_UMIP) += umip.o +obj-$(CONFIG_X86_UMIP) += umip.o obj-$(CONFIG_UNWINDER_ORC) += unwind_orc.o obj-$(CONFIG_UNWINDER_FRAME_POINTER) += unwind_frame.o