Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756498AbdGXTK3 (ORCPT ); Mon, 24 Jul 2017 15:10:29 -0400 Received: from mail-sn1nam01on0078.outbound.protection.outlook.com ([104.47.32.78]:14752 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756080AbdGXTJC (ORCPT ); Mon, 24 Jul 2017 15:09:02 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-efi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Borislav Petkov , Andy Lutomirski , Tony Luck , Piotr Luc , Tom Lendacky , Fenghua Yu , Lu Baolu , Reza Arbab , David Howells , Matt Fleming , "Kirill A . Shutemov" , Laura Abbott , Ard Biesheuvel , Andrew Morton , Eric Biederman , Benjamin Herrenschmidt , Paul Mackerras , Konrad Rzeszutek Wilk , Jonathan Corbet , Dave Airlie , Kees Cook , Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Arnd Bergmann , Tejun Heo , Christoph Lameter , Brijesh Singh Subject: [RFC Part1 PATCH v3 07/17] x86/mm: Include SEV for encryption memory attribute changes Date: Mon, 24 Jul 2017 14:07:47 -0500 Message-Id: <20170724190757.11278-8-brijesh.singh@amd.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170724190757.11278-1-brijesh.singh@amd.com> References: <20170724190757.11278-1-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: CY4PR04CA0049.namprd04.prod.outlook.com (10.171.243.142) To CY1PR12MB0150.namprd12.prod.outlook.com (10.161.173.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 227a41fe-f84a-404c-fbb6-08d4d2c75df7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR12MB0150; X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;3:W1Incj48swY0LX0oJDR/K8eNlxqWfCBIFyMHeiMUCfC+ZlFX/HNZ8wN61mNamFjicIwIV1hvQBzd6LpCB/j7xBDYOZEmKncKxcxk/7nlDc68s1ibWt9mTdXID72MgOkCIfd4unCytTRXXd3OO3AXflQOyvzgzqO9a3kaxVvs+jaZONpC3+XjVgyGTDJhuF4p2JaRIDPbY6MryfVMK3dRnkcuueRWF5egyPiTzQhB/XH0SrHstrEa6Ag21inTd4xk1R0gBd1s14hgJ2zmBrCIN49bed0MEWpP1Jff5QIZrC4xmeoyv/TZEgs30y/535yaCSvWp+ihfymFpp6/fH0ZEGL/lX5w4uNlkmp8yUNZT150iPTjCBAKS5kzYpUcYJSUSCO7YL+h/Z0bFrZYdSYbeSwznZMlp3vNZspD9+Y9xLyLhZ7601MTMU8VpshcKDRrVet8icvmZqN6T5IroOUHrJQ1He80XhOyL+EHpLaZBXnwMelHJyVVBUcs1PxSsaXS1FgWVQk+H8DEZnuvezvgsdA9e9QD4CQJy3DKsuj+PEA7J78WtJA55kek1pDYtH8U7ovNOJ9hlA63OOo5kIsiJqlkKsV2E75Dq7Y01hjmhDUi0Sqz0dFZGXthfL+7lWPjTFZnlTqDGGhsV0nqdMkeHtC4Yfu6L0JCCI+ycFFPAb0EUxi3rDsLm+Rl+pL65KfOil18/09xS3uElDh72rQOLYGdw3pmatiKd3QBFs14ujf1ZcK+T6Ma6yV1PlDx/bJZ7HMD7Qw74q8MhYC+3SfqkA== X-MS-TrafficTypeDiagnostic: CY1PR12MB0150: X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yRJx+lEmSJdQz6JXwOceAJVj1yStElvXmtv26Lv0T5689jgzfP058Nk/oO0WLIWWC X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR12MB0150;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR12MB0150; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR12MB0150;4:cL4t6rBTKSCpzgYBtA8oL4wY9ee/ZikE1YG+VwGhH9?= =?us-ascii?Q?mjfjsEW+wTgnAAHf608C5JhR7xq7XqneTxAKVu5JP9iR/6PIqsjRGsEiYSIH?= =?us-ascii?Q?CfSa8w9cIobEqmmBey9wB5AKe7+XIlfgtscILkFvicq1szgdYU7VMbgiwIRJ?= =?us-ascii?Q?57qimSflZn6GuDnJDPO+wzJmClr/iX2f8BDVMaixHoCXlXewztB+sET57o1Q?= =?us-ascii?Q?YFdX8ucSHU4/sE2bPO+SpV24abL3ZHft7oDQPfvXMcCHHJJ/NEDkEW/21xcX?= =?us-ascii?Q?nu8Cy9kfROqZ3XMQyn1yC1H3zQp2U31AdbGaIcRlYyZ5j9JdD8EtlgeNSbLb?= =?us-ascii?Q?pUqSbbaGr18jKQP1GhKIgQvoEicJqClNFLD7rmWIpdlEnhKS1+4h++Ve1Hpi?= =?us-ascii?Q?0PHysxRI4TRJT8WkIV87t0dt+GZSj18LUs0HlrXgWX7Ghtv+D9jC7q7WxbvF?= =?us-ascii?Q?zc/orGAXFDA2oZgLFDV/KfxyQE1lWMCHqCJ3KkOhkT+NCr+aMovJjB0aPRUT?= =?us-ascii?Q?UY7rUlvzpNsurcbiBcQpqM01hErCNg123UttrHNdf930WHvs98lbleXd9cGE?= =?us-ascii?Q?0ZZt3OKVSaBqavYyxvonbYqtZhMoWk2WaUZ0G222LG4i6MlHDmn0PROYbUK8?= =?us-ascii?Q?STB7DaL1TguEZMhJ3rxa3UjVShyLzegVJfl8H4hQpU31MT0fTzB5aII6XqO+?= =?us-ascii?Q?rMxc+hQRtAfab3oSUpzvmo+e8Z77tM7l+XYb5iGj5mBfNaAK+bswQoaaGaq0?= =?us-ascii?Q?n2hBOLGodxGQH+6VOabCvEW65Puja7tchpbHW1CzoG6bR4e3R2ZPTPjlzDTp?= =?us-ascii?Q?IvHZYY65rI9jXurKvZczg8JP1z6P8eL5ncv1RpUTnpoWBAl8iGrg3X7VyF2P?= =?us-ascii?Q?h078jXOoGJbjv83Mun30YQGTOLu9QpU1wzWffSHSt9jQEsDKdtZrq4wd4Gxz?= =?us-ascii?Q?u6oqUSNiTdM2GezKA0MDPX0B0gOoLAbIeZ6BycLqcUGumxqc6Xk8BlTYp27k?= =?us-ascii?Q?wrmhym22IkPyLz6xpwjagR/IG7yUlTVqx1As+BRGjuFIKifAkLeVgOJvumrj?= =?us-ascii?Q?+wF1f2Qpr9sTKwbZx8GW9CqesMls9EinETiGJK5zs5qndS+KR4u7IEldrUe+?= =?us-ascii?Q?UrnuhEY9CX2mVGSRQn8wkJrmC7gMf7/eerLoBQk6QxZxByWBXd2eBpAz+Wy7?= =?us-ascii?Q?TwNXhAuVr0w5U7maZz0Avg4TWgtO4yakx+?= X-Forefront-PRVS: 0378F1E47A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6009001)(39840400002)(39850400002)(39450400003)(39400400002)(39410400002)(39860400002)(199003)(189002)(4326008)(81156014)(7350300001)(81166006)(50226002)(50466002)(68736007)(36756003)(38730400002)(1076002)(110136004)(53936002)(6116002)(25786009)(48376002)(8676002)(86362001)(305945005)(54906002)(7736002)(2950100002)(6666003)(50986999)(101416001)(47776003)(105586002)(5660300001)(5003940100001)(7416002)(33646002)(106356001)(66066001)(6486002)(7406005)(97736004)(189998001)(3846002)(76176999)(2906002)(53416004)(42186005)(478600001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR12MB0150;H:ubuntu-010236106000.amd.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR12MB0150;23:F3TlDUYhVLTjsJcH/uAa4NQk80UWxVBvOOlKiNaPx?= =?us-ascii?Q?XugGjlwQkvxycnjfNZd9DCrac+JfcUA9cUI7IA92JBmOksJoiZontqKGrVFj?= =?us-ascii?Q?vIBGUOqf4ChBhWO3z2yK8K76KXHN+Xq10/mzM02NHt5ysvKX8q+HGQkd5vxO?= =?us-ascii?Q?0rwy5VEDWT6sDWLidhi66vSV1d7J0WGt/0kuVMzMg/fzuIYUsFLHl/nM5eiz?= =?us-ascii?Q?fqFSqQVPHvQQknNJA5f6oFEVGk5JuOIsLtPmWoszSeVJq9YMlzL67YK1mjF4?= =?us-ascii?Q?PXd/LDVuJN3E/pteuY9NQvAr4xycuXHlMdCXBUrYYHczyBo/AX4Zp5iQ3yu3?= =?us-ascii?Q?PAYntY9cUx1H7Ooz6VhsaANZwCTt25PzCJ/+puQ8tCf+9ejF59MQHs9Hf9Lk?= =?us-ascii?Q?4zRN9JWpux6V2/hvHwNM/wNrlyc6upOLbOUgf+Zfk6KR6pZUM1G1eNRsLx6c?= =?us-ascii?Q?8NfA0uH7JguVMszGGW3aRDZmd5F3Y3tnaOhsJ1M7sOaF9dck6fiysZYf0WoN?= =?us-ascii?Q?lM/1xbwUHpLiZ30NR+Ia9dwHpGuZ54EO5IU2aANEZyORfJW5qjJqRdI2b2U4?= =?us-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oTYTdgeJxpmRLhiFi4nrEBpVfEuIwsuoCaLIGnccD8nwmGlaH4dFwd66KOZ2TSivoJNtne7S51TPK3AznZVRuxUa15qCJRx70u7X5RITHLpyum24x81y1vBmxWttcJl0Ih1vcy9hr8+6CiDY+1TfHqEvF/FCiRmoERMRrqtThCZVqPe2I1QfAygWa65ftkZewyN/3PEwPXdS96HJY6jWx8Hi+bUvfkFOwWb7NKEdr+WTcI8ZFpdYFk/EcPvGI8lTjb8Geq300IUAqq4VVqkClYZNOfEf65tkH9l1Ru8fJ5PvxoU9c39UIcMtBo6UmJeBVL7+TNXYmLKgpKUrIzBUn2G9V0W5O0I01ygqh6ALYg7Tfeo7thuZZCD9FgwWsb2EAkO1drY7HfzQu2bYSNxvnsYhPRYUuKqpw7LuRwftvGiKRQ/uYFq2SLKdJPnYEKThsOGjBal1F0pFbw5F8fYuDwu9SldtVOgVv2Ksdr8lsq2FO+4An+9ooG9Z7+F8J9f6RH2puTr39Py5ExsBo91FI8mE6WdjUOk+6nTX7Oi+D6XOl/yQ= X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;20:9y9jDLZdDtRXYntBUf5oR2IyabeCWVMAuZDnFryTZxgor9GV/iKyU92JgW2n+fazEaU7y852NXIFhNLpk/rptX+Hfj7XTImZdwRgQ0dlOFEL3+uc8tZ6ipg/tAvJXFBNm1RL44JygJyWn7r9XUYKP8BBFENs1+apiLzfdpry9pVNWkZU4TrbE6U0j7geMJ8tbrf9eOM0yG/S2MPjEGyLkHwkLmUAqZooSTs8AgdKABfrHidTuKSv5VytSo8Uq7VM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2017 19:08:26.8409 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0150 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 973 Lines: 29 From: Tom Lendacky The current code checks only for sme_active() when determining whether to perform the encryption attribute change. Include sev_active() in this check so that memory attribute changes can occur under SME and SEV. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh --- arch/x86/mm/pageattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index dfb7d65..b726b23 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -1781,8 +1781,8 @@ static int __set_memory_enc_dec(unsigned long addr, int numpages, bool enc) unsigned long start; int ret; - /* Nothing to do if the SME is not active */ - if (!sme_active()) + /* Nothing to do if SME and SEV are not active */ + if (!sme_active() && !sev_active()) return 0; /* Should not be working on unaligned addresses */ -- 2.9.4