Received: by 10.213.65.68 with SMTP id h4csp1557141imn; Mon, 19 Mar 2018 07:23:10 -0700 (PDT) X-Google-Smtp-Source: AG47ELuFWzIYzx8rbQQcsozgdWOToqJP0xiovIgNTN9q/2gs6Go7/PHU2yMLGOqztAIaPbS5cV8Q X-Received: by 10.99.100.132 with SMTP id y126mr9110544pgb.77.1521469389991; Mon, 19 Mar 2018 07:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521469389; cv=none; d=google.com; s=arc-20160816; b=RCCZXHDRdVWhpX596vVc9HeVRalzi7PE7b3EOz3kRrHc83lsnK4rY1WPo9Ej0PnKS7 lPRhXbTZMe/zXED8gNafQziPNq4lYe3Tbia7qN5UPfQ6WfVr9r2YcRHzS/9sZ2GYjqD0 aKVfUlrsqR4WeX2GKCWKwQIDOmaSY3TjHQYnnqHpr5o9Mw/eMvhqDoqMffKZLUrCyiAO NJq+NUhYLkwJ/OWcQv+o3RSiq5CJN4V9O9ayBHRO97bL2MPEtyYdWyB75vg5UXpVs+r/ LJT6mbhtt12TtpFe9erZ/NkYcZZ5PZx/Aon5CDO4bOzwrS75HTgObdDvf+5WIc4aGm9M ckrQ== 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=nefXYKuXxugJuvNjC5JIlEjwxomgZFvNjhcgmoWSnkY=; b=cK759Vik+XQ2SS7wdUGO5MalXc3N6qSilPyApNCKrIXarwVrxfPKo94veVMpkTNhhi raoglr2CPwhiJv4Y3vOWPaS0IAhVSi0722/86l0kw1OljXhzylOUbl2pfSSp6LdC7wL6 wwSlYRBZXIpGTB0ndgJTmtFMUd+hox5UCaePsqNdHD8k+aCbgqBj80cOSCSXnqvGLu4l TAWHyzUASt8CF07BR3g7KXvqtLVUdhvIvc6hxkK3QF6tMNziSgrmRVuUrwD4+V8lJIM+ DWI1pBzAjXmpll0DH3LGyteheO/cfWt79x7Uh4ZY2AdWx70gAyxc2sHMvfhrBpsk0W9M lXyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=vIWhGx1J; 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 t6si73101pfb.98.2018.03.19.07.22.55; Mon, 19 Mar 2018 07:23:09 -0700 (PDT) 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=vIWhGx1J; 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 S933532AbeCSOVc (ORCPT + 99 others); Mon, 19 Mar 2018 10:21:32 -0400 Received: from mail-cys01nam02on0069.outbound.protection.outlook.com ([104.47.37.69]:60032 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932708AbeCSOV3 (ORCPT ); Mon, 19 Mar 2018 10:21:29 -0400 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=nefXYKuXxugJuvNjC5JIlEjwxomgZFvNjhcgmoWSnkY=; b=vIWhGx1JClGZKwxOp471j+vXevgorLbKBw36U0ioN8NXF5H7mItOIiaGJP1jlf3TM1b6JpjpjGTnMhmD82Yv+W4t0AmK9oX2h3Ko1lGPSxo1ubX+sFQsT+yT7cSwMeAkukeRxbY7/eFYxRq+JRPTB1p5MO+qcN6w+Z5uKGWnQp0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; Received: from [10.236.65.116] (165.204.78.1) by BN6PR12MB1137.namprd12.prod.outlook.com (10.168.226.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.14; Mon, 19 Mar 2018 14:21:24 +0000 Subject: Re: [PATCH 10/14] set_memory.h: provide set_memory_{en,de}crypted stubs To: Christoph Hellwig , x86@kernel.org Cc: Konrad Rzeszutek Wilk , David Woodhouse , Muli Ben-Yehuda , Jon Mason , Joerg Roedel , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org References: <20180319103826.12853-1-hch@lst.de> <20180319103826.12853-11-hch@lst.de> From: Tom Lendacky Message-ID: Date: Mon, 19 Mar 2018 09:21:20 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180319103826.12853-11-hch@lst.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: BN6PR05CA0014.namprd05.prod.outlook.com (10.174.92.155) To BN6PR12MB1137.namprd12.prod.outlook.com (10.168.226.139) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 395af5f8-c077-4c96-a5bd-08d58da4b350 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:BN6PR12MB1137; X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1137;3:+/mZt0X95nB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klFFjLLblfTvo/5af4CZEGadj7c4IACV5nG0b4gK1F1UGKUCI8/MX82pubqR1hgRfFAnm2Qrn/etVuZFVGAcsbZBqMT286hbBNhJPOwQ3uasbR3yWApfH4Lkv2Tu5nlNbTe0v8kvYJbuCUbcDlPuWyUtghLp/JV2JS2BN2lmUnmYi8dJ1mnj9ePXwvk8JcrQ/aIA07pqlr2ufipy9gVJ1Ux2GV+S79h6UH/vHQlWTm94svOEsjtcBcKLpzyfEeGSMJv6m0igaBXsiPvvswIEv63aw5YIs0cchJQBAWQrdW8A7PIs8JsDwkXjl+pqo/6SDaIt;4:myD/edwmAt2sMqDXJ5yuCqEnhP1R3SJoib9MSTJS/lmsFXGt1A6yR0FOwRhb042x4KXKCLk1fBy+/PKoJn1ynD+eL8ZFidgY97S7GPgNYvbJqyzozEQMB7nuUsFwWXfsMQvEPLeRQEDGmkYfCcMAhhoHqeaBZSryaUIu6AK+s9QkOwFtIaoEmyHeyxVnELoEErf1pUF4Tic8bjxJvfa9qSDe34Tlhb6Eq0bgYojp0FjQPRgxU3UlQvemWkBHAtgu3sajSAbBsza2+JrXtECPijnANIcc4XoNpQ5uiw5jVFjKhPU85p806SopUytJw2bCOSuY/n51oY4RcVLHJOIWqyz+kNW4CKjZxw/eQeRobUA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(146099531331640); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:BN6PR12MB1137;BCL:0;PCL:0;RULEID:;SRVR:BN6PR12MB1137; X-Forefront-PRVS: 06167FAD59 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(396003)(39380400002)(39860400002)(376002)(366004)(346002)(189003)(199004)(186003)(53936002)(316002)(86362001)(50466002)(53546011)(3846002)(6116002)(54906003)(386003)(16576012)(16526019)(5660300001)(106356001)(64126003)(4326008)(58126008)(305945005)(31686004)(7736002)(6246003)(105586002)(230700001)(229853002)(36756003)(65826007)(6666003)(97736004)(81166006)(478600001)(31696002)(8676002)(81156014)(90366009)(47776003)(26005)(6486002)(77096007)(25786009)(66066001)(3260700006)(65956001)(65806001)(2906002)(52146003)(72206003)(76176011)(8936002)(52116002)(23676004)(2486003)(68736007)(2950100002)(142933001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR12MB1137;H:[10.236.65.116];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM3OzIzOkVPaVlGeWZaWVNXVVhCYnZ0THdWaFpvaHZu?= =?utf-8?B?QWt0UndLTUVhQWtMWnVqa3EvbWlVdTNXRlRyOWVHOXVnMXNnMEMreFZCU2h3?= =?utf-8?B?dmJWTEtNTGFpTkNUcHZPL1lDZ1Zhc3pDajFwZVlhNUM5VDlKMHlQY2ZVRDEx?= =?utf-8?B?U21rVG1jQXZRZmljZ3ZlVEJCL1lCZ0VITVY0UFNEVVViVitIbzlTdWw0UkJq?= =?utf-8?B?MDQ5dllRdCtHTG40TUlNbUlhMUI2RDk2TkpvdmVqcEluakJyZHZmMUZIcFlN?= =?utf-8?B?STJlbkJUZEF5dHhiT2E0c29wckRiRC9EeXRvVnMzYWF4Q3NuQTh3bDVYa0tL?= =?utf-8?B?empwUDRnM3lNSTRHdWdYL3hZMUJ0WDJZWEhlMGVqU2MvMEZGc3doeUVXdUNM?= =?utf-8?B?WGQvOW5zVEViTklpYUZnTGxWdFpOQ1p4cWoyaGZGNzF6MzV4K3ArSlRKdmxx?= =?utf-8?B?TVd5N1FXd1FwOEoxSTN0Vm04bUFvZ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jJHm/GGx/w/ME0k7WIBH8ITN+naJBQJqXhY9yfXqEIkitWda9IJjk1+TABaZUCjR186JXoz+C4/4HYkQylgJvxVBC+mRGeCZd4lvQWunv/MvTKTvzOvg3f90tVVRoLI41QPLD2d3zz+ceeOkBN+D1CzEM5QiwEg1+AUUtXvNUILbDURnpvznxzzhmOD3Q=;5:kS5E1fxQY6wRRJB5ggybFhyKDM4KJQsHvGM3ZwlVHGirY+wAewKcRbL52JMHKQpWUOmlFUaYanSyw3fX/5tVD99DpuoN0lazqnmEU5KgXufDcY0twScphkeAWj6+t510r+xobBOeqmvSjyCJMXB1equnElbsHoeRcrmN7C3dZok=;24:gkBtFeHtlktlrfvhvsZU1Q3H6noSCyCMwItpD4L4dJ7KbVdzT2bxlV2lnztrlL9GWgxxprgFB3yfnofrL56xJ/SbglS1Pisw285DRxDI3eY=;7:PN8s8M5iFdjX+E+cKu8kVyGCHC0n/KEAjAUy1djMA1aPXS8kiWZONmup6gqa4iKb3fpZ1oCEyqtqVA1dmW/CdRoQswn1ifucFVnb6BaRcm/8tA9tPCN0cyFG7Z/NWvPZu+mEzZLGtMSPfzq/genUTLcJ6GILsYqx7kliZUAUF62nlDoXIF0/h2ItzDzW8+B1z9Lng/eBbQGhQJennNpITkbnY311M6fs8LYZA7M8elnniNnhQme2B2R4gjWQaGcc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1137;20:yWVdvedGWgYi2Vgs2OXrH8n0mFwWn9YB4p4igE+3f/F2449+x28OjrP9uy+ozHpTqcSd1hCAvednnooYJe+UfmPxxN7IBub0COApMiMRYnWW4PYvqZw8DnaZhLLZroScv3F/TPb9rIV0OwlsSzD+hdswS7OiBlRwUmWJdBXWxmsw36uRqUB53lCsTJSDkcoURHji8oBgNWa/0YI7PltwOIlP1qSIlbQlMuayZFpnjcneyczqNWh6Sj3XaosktBlo X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2018 14:21:24.5746 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 395af5f8-c077-4c96-a5bd-08d58da4b350 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1137 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/19/2018 5:38 AM, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Tom Lendacky > --- > include/linux/set_memory.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/include/linux/set_memory.h b/include/linux/set_memory.h > index e5140648f638..da5178216da5 100644 > --- a/include/linux/set_memory.h > +++ b/include/linux/set_memory.h > @@ -17,4 +17,16 @@ static inline int set_memory_x(unsigned long addr, int numpages) { return 0; } > static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; } > #endif > > +#ifndef CONFIG_ARCH_HAS_MEM_ENCRYPT > +static inline int set_memory_encrypted(unsigned long addr, int numpages) > +{ > + return 0; > +} > + > +static inline int set_memory_decrypted(unsigned long addr, int numpages) > +{ > + return 0; > +} > +#endif /* CONFIG_ARCH_HAS_MEM_ENCRYPT */ > + > #endif /* _LINUX_SET_MEMORY_H_ */ >