Received: by 10.223.176.5 with SMTP id f5csp476428wra; Tue, 30 Jan 2018 14:41:52 -0800 (PST) X-Google-Smtp-Source: AH8x227sPFD99B93TmLSMo4NL7hSZuCh4zFNY+BsPy2zqLJw+HgwJJpMW5RrF8lxRsN3K26MKi0C X-Received: by 2002:a17:902:76cc:: with SMTP id j12-v6mr24327857plt.120.1517352112007; Tue, 30 Jan 2018 14:41:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517352111; cv=none; d=google.com; s=arc-20160816; b=HOCtcCmnYvAXBKEVlaZg/5kBCCxtIuaohWJZaHjxJy2UggiukoXtGdfFmRf7Do7x1r d3mLCxyKLcCyFjtWYEuuw2qnMAUk98N2o2npqdnwqlp0isupMP3KEd3+WnfKedclnKl0 b8TzdL7GC39vd1pahY6fePZxu6E0rOcJC18l2lZ9aooU9srLG4Z4FmDxakEVgtja7kB6 ba2bDoW2nmJ3ACdO2mmlRSW4njN+JVBDBWWm8a+XevYVI3AQZFq4VCqvsB0vNk852i/C 9Pfu5ttpQH9mliJduYbUjCQPygKTSNzoHGLNxICF6fDZeVJJopLjXXCBFr7PnII1++4b i2ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=SPc+75IiHAMuS5qlP2rPFwGVIgJUmayHVeARgb+mMQo=; b=FZ8zrm4jNyuIRq3Ut4gb5HFjJIjFotklSy7Z1+cMSM8xltE55CiAF0d8e3Xc23J4pJ QKDUEHKRpnEePyYW/M9t4QcqHBypApS/SxoJP6CX9nO17yUXDR5stNFTDCHdBGNCrIsc R2Tcpz92XvtXfxBRMg4jZoCzyx2fC9KY2GsTiokwnSTP76F07VXwq4idSg12r/CwBoFM /XYdjRrYVgmjT8xS0RVVCzM+bZ+BOrAtN1nu9q/erCjWU+tfvc8V7OZ9htkt8hJqqpt1 G9wpZaLECHBRdd/LNq8m632ramL1uFZ+j7IeNR6qbB4SbOQMv0eBnPUHDTaGZh8G2NgS 2Tpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=5Ra8N+8j; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f89-v6si447768plb.344.2018.01.30.14.41.37; Tue, 30 Jan 2018 14:41:51 -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=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=5Ra8N+8j; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753040AbeA3Wk1 (ORCPT + 99 others); Tue, 30 Jan 2018 17:40:27 -0500 Received: from mail-dm3nam03on0054.outbound.protection.outlook.com ([104.47.41.54]:38112 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751927AbeA3WkY (ORCPT ); Tue, 30 Jan 2018 17:40:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=SPc+75IiHAMuS5qlP2rPFwGVIgJUmayHVeARgb+mMQo=; b=5Ra8N+8j5vXxYQy38yFqKLSpCEDKCKOf5igPot8h2Ox1NlZiZokYPZN89VmqZs27Dm/ieOhxBRq+iD5lMV603VxXtUmUES/sWClPtnJG1XPHkU42szFTjmLMdFiW2bZKdPWrNN6jbFllGoqfF/GryZTFsNsEuODwC99v9WVXl+w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; Received: from [10.236.65.116] (165.204.78.1) by CY4PR12MB1143.namprd12.prod.outlook.com (2603:10b6:903:38::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Tue, 30 Jan 2018 22:40:21 +0000 Subject: Re: [PATCHv3 1/3] x86/mm/encrypt: Move page table helpers into separate translation unit To: "Kirill A. Shutemov" Cc: "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Linus Torvalds , Borislav Petkov , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20180124163623.61765-1-kirill.shutemov@linux.intel.com> <20180124163623.61765-2-kirill.shutemov@linux.intel.com> <20180130222800.7hrnzpy56fb6jwnn@node.shutemov.name> From: Tom Lendacky Message-ID: Date: Tue, 30 Jan 2018 16:40:16 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180130222800.7hrnzpy56fb6jwnn@node.shutemov.name> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: MWHPR1601CA0017.namprd16.prod.outlook.com (2603:10b6:300:da::27) To CY4PR12MB1143.namprd12.prod.outlook.com (2603:10b6:903:38::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d8faab49-f626-4c89-95ac-08d5683272a0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:CY4PR12MB1143; X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1143;3:5kklL0wL7u3T1fkq9xuQnOQjOKm8tkFYcBZ9YUA0QUnzu7IvKQU7r0fFfEad+9eNtj38LZoKxna/FN1KfZQaJEWyOQ5urum/lQGPDVJk2j6DP1/5GFhxeZuW0CBlI0ZfayOaZ0LS0YkSaVH7HtHDZhMRbMjXFkjVI7nBLQw0o+7ML+vuc1ryGmHpeZ/s5bVLMtRFsFhMejqSMr9bD0l93dasQRTjOPtuvtRMzZQcVXfQgJ4E332lBBAOy1OU9XzE;25:GHFKu4cwnV45cGCiCvPy2UxNSR64pohxGdW5adHNQ6/8uPrHbWvGTxo5jAV7uRy6b8gCEt6nTRfSRvuKmHGuG3XDEPQ5GtGDwsi/ide77LQAYmobTe0d5HAQ5eF8lKfLP4BdrTJ/IlXhG4obbZLlrHvEg4NZkoljX5MoRAmkcwcy75f8yzH6qCzoCn1XUCAs7ZNPdhkA2xws8xduOqqofXSANWx3FJz/1GMA0KFND9wdzoSjS5U8WCl7nER/pbMpBLv1817zHEXSDXxlkNwZnowhL5r+SPDOXl1AbhADIWUfJUQJpsjcOFuYICIbCAdvvjAAoINlyh3bHLQUO4KGjQ==;31:/LeKFsPJKmT2PvlUxa5t7WogDVvLjpZBrq/n9b0UObXwu/Lk4UJx4mvWnz4W+xI0oJG71gge5MOCPMCK+YkxKlMgYROM9+V6Igu4ne56sJs95clF1RkoqGQ0HoPijsMicK1Q1wqFCgjkH0XyfZRP2bnC30+586FY68LlGVNioB+FiT8q4n7J5JIRmDvTuP4oqLEEUmisD66F0ndx8QYmHIy8OF/Bd6/2Ed7CKe0rqv0= X-MS-TrafficTypeDiagnostic: CY4PR12MB1143: X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1143;20:fpU+vq9gK8swl0l9r9vqyltaSYrHOmfk0SxsgfgKlaSF2ASdkHp+B+S4LVTI7A+dJYrRCyfoUQBYrZuBLXAV1bRCqdkwuvubiXMKcDF/n52O2oWJvfj1JEhr/txFoDQtbqkzLzJ4UABsdjzOu/rctcD47AtD1/r9vTriJIeutJEvXhPoJOH37YFYxPUgngkuktjUN2JqDW2E+A3q7Uxn1FKtmfGVTfHdOa8OJS61GPNzX4auNAn8pUT8zPkbaktL8dCRzLMsWN9lu63UDEnLEwrPZHZ0cAHBJQlKe5EXlx7rNyXFNzIxOJJVErwY3WYJwamIxYmfKxREWRaKH7J+idR42PVMN8sMIYPqOrq1y2UMK4FxbPpXjuoDEdzfDmFcmHcvIZVMc5LkHa1RGQbPJox2KIC6r7CF9SOfpuF+DiD1MELNITf9DR012c/NRwUFa9u3vW0tKNQ+6BXpP970S3H6KOUtRoEH3X8Jz2eFCCSBFxSvrdXQiNC584unrU2q;4:FwmL/NvQsJyrLhOt9nGtWb59hbjmo5Ga6TbAzGnZcnd1RTSbyP6YWMPHpylVIc4ouZil5q3Xy5q1HQyZQ9kYPT5hnpg7JJzhlRV0uuUPjRfG1Uw3T+M6pMxjfJzwIWhoaJHHt6w5blTEtONXuL1UpaC03dGJmKVd5By3ub84OFXUAGZ8vKUMNZVxe9Cxs9MXY3yAEuHe8ck1ZyOdk7SdCwyl6fqEPLMWRV+hZ8zTM5PbZBWIqXUJTH56Uc1nkP8pvYTsYd/HcOAc6YH9nMwA/m0vcmTXB37WLCzOMhWdxN58PoRxNm/9CSt2OKLRfOHKKx8okAGeccd9VDbSgl+Z9w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231101)(944501161)(10201501046)(6055026)(6041288)(20161123564045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:CY4PR12MB1143;BCL:0;PCL:0;RULEID:;SRVR:CY4PR12MB1143; X-Forefront-PRVS: 0568F32D91 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(39380400002)(396003)(366004)(376002)(39860400002)(346002)(199004)(189003)(7736002)(81166006)(8936002)(2906002)(86362001)(65826007)(186003)(5660300001)(81156014)(83506002)(26005)(8676002)(305945005)(7416002)(386003)(16526019)(6246003)(6916009)(3846002)(53936002)(6666003)(6116002)(50466002)(66066001)(93886005)(65956001)(31696002)(31686004)(105586002)(97736004)(47776003)(52116002)(6486002)(64126003)(229853002)(106356001)(2950100002)(478600001)(77096007)(25786009)(68736007)(4326008)(52146003)(316002)(23676004)(72206003)(53546011)(65806001)(230700001)(58126008)(54906003)(3260700006)(76176011)(59450400001)(2486003)(36756003)(16576012);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1143;H:[10.236.65.116];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQzOzIzOlBqcHd5dzU1UFBXcmJtNjFrZ21WU3U5ZE9C?= =?utf-8?B?Q2R2eDB3NDEreVBla2plTjFScDZxaVV5VnVhSTV6M1JOVHR1eldKUFF3MGRD?= =?utf-8?B?QXJqWnBUdDZId3g5VVh1RmRFMkdjZldhVzZXQVN3UmhLdlVnRVczbWhzdk00?= =?utf-8?B?blNqNUNQa3VWeGM1cXFCQ1o1R0FyMWY0L1Vkd0hmMy9GR3p4cm56Z0lKY215?= =?utf-8?B?U1pKcG9ocmFZSHpsL3F6SlpKUmhkaHJtUlh3RGR0OFg5Qit4NDFESitKTGl2?= =?utf-8?B?b2hvRlNOWGtyd3lZZldYSE9ka1Brb3I3OTlnNkpmbHVlNk9wL2JMckwrdEtC?= =?utf-8?B?Mm9Pc2IzMC85T1JabHl1eEZ6UldEOXFJeFlxZWl0YXdZNklHTGlmL0o2NjF1?= =?utf-8?B?Q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X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2018 22:40:21.1073 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d8faab49-f626-4c89-95ac-08d5683272a0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1143 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/30/2018 4:28 PM, Kirill A. Shutemov wrote: > On Tue, Jan 30, 2018 at 04:26:03PM -0600, Tom Lendacky wrote: >> On 1/24/2018 10:36 AM, Kirill A. Shutemov wrote: >>> There are bunch of functions in mem_encrypt.c that operate on the >>> identity mapping, which means they want virtual addresses to be equal to >>> physical one, without PAGE_OFFSET shift. >>> >>> We also need to avoid paravirtualizaion call there. >>> >>> Getting this done is tricky. We cannot use usual page table helpers. >>> It forces us to open-code a lot of things. It makes code ugly and hard >>> to modify. >>> >>> We can get it work with the page table helpers, but it requires few >>> preprocessor tricks. These tricks may have side effects for the rest of >>> the file. >>> >>> Let's isolate such functions into own translation unit. >>> >>> Signed-off-by: Kirill A. Shutemov >> >> Just one minor comment at the end. With that change: >> >> Reviewed-by: Tom Lendacky >> >>> --- >>> arch/x86/mm/Makefile | 14 +- >>> arch/x86/mm/mem_encrypt.c | 578 +---------------------------------- >>> arch/x86/mm/mem_encrypt_identity.c | 596 +++++++++++++++++++++++++++++++++++++ >>> arch/x86/mm/mm_internal.h | 1 + >>> 4 files changed, 607 insertions(+), 582 deletions(-) >>> create mode 100644 arch/x86/mm/mem_encrypt_identity.c >>> >> >> ... >> >>> diff --git a/arch/x86/mm/mm_internal.h b/arch/x86/mm/mm_internal.h >>> index 4e1f6e1b8159..7b4fc4386d90 100644 >>> --- a/arch/x86/mm/mm_internal.h >>> +++ b/arch/x86/mm/mm_internal.h >>> @@ -19,4 +19,5 @@ extern int after_bootmem; >>> >>> void update_cache_mode_entry(unsigned entry, enum page_cache_mode cache); >>> >>> +extern bool sev_enabled __section(.data); >> >> Lets move this into arch/x86/include/asm/mem_encrypt.h and then add >> #include to mem_encrypt_identity.c. > > Why? Will we need it beyond arch/x86/mm/ in the future? I just think it would be best to keep all the memory encryption stuff together. Thanks, Tom >