Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752698AbdIFUit (ORCPT ); Wed, 6 Sep 2017 16:38:49 -0400 Received: from mail-by2nam01on0080.outbound.protection.outlook.com ([104.47.34.80]:28224 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752313AbdIFUio (ORCPT ); Wed, 6 Sep 2017 16:38:44 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Cc: brijesh.singh@amd.com, linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, Thomas Gleixner , Joerg Roedel , "Michael S . Tsirkin" , Paolo Bonzini , =?UTF-8?B?XCJSYWRpbSBLcsSNbcOhxZlcIg==?= , Tom Lendacky , Herbert Xu , "David S . Miller" , Gary Hook , linux-crypto@vger.kernel.org Subject: Re: [RFC Part2 PATCH v3 02/26] crypto: ccp: Add Platform Security Processor (PSP) device support To: Borislav Petkov References: <20170724200303.12197-1-brijesh.singh@amd.com> <20170724200303.12197-3-brijesh.singh@amd.com> <20170906170029.bvpii7e7x3fglhwt@pd.tnic> From: Brijesh Singh Message-ID: Date: Wed, 6 Sep 2017 15:38:38 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170906170029.bvpii7e7x3fglhwt@pd.tnic> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY4PR2201CA0008.namprd22.prod.outlook.com (2603:10b6:910:5f::18) To DM2PR12MB0153.namprd12.prod.outlook.com (2a01:111:e400:50ce::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b85e7aa4-255f-4866-f6a5-08d4f5674325 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DM2PR12MB0153; X-Microsoft-Exchange-Diagnostics: 1;DM2PR12MB0153;3:Alez7ek4cuQPKSZDE4bajLYOp0x+ro7pp7RF2tx5KTvMPOFydYgCUGBptFsWPszJ97WXFzmYy8aamz8lQ7j+fZ4xl+lFOsmXYQ+ZuUprr9Y+GSjy5k7Q3+2Tz/vWOxbIyzOKt91iI0xM7omyQ0HGYuixVHzTqjCRXMu8o7rFsL6CWAqFOxo4pYxCG4USYoJzvjOUWDxamvxdGeJ+Gp2PIr8tef2UTxblmQ6uplnqYwz7MSv3DUyKEtq43iY69Ehb;25:8NfDAD8JDg+7MysYn5BY6FuljFzOfQnItwEvcnlU9+s2L1Ik8+N2EZH2I4RHHtNB5HOJJ0zsklfOqOI97IufSM5FfK90qsJKI6F60Wc+lX5/1J6MgArjo7gFa9K2/6pCN53ErkkWMCHZ48ijuuuf4Mz0BvYLZe5lkNuDF72DOE0MbKA+CNIf2pnAOO5CpRezwwLRygUz8QF/Nhvv7UWF1uWJSxSmVkOcUtaiNO6TMZ4lHE6UAdL5pSTVwIe1PzIKya9OpwxJTu7Qe7VMkyJy+Kd1o2GcP1DXt20MB2bESGb//XI2m176y4cvCOo9MSuEp8/MJAceOvNuVtCcHS7bSg==;31:srWFRfRrFXsI12ER1FOB2DxTKMqPyhn9qKxbfmSb/JfD4JJI6SBr3WGNU/E/2WqV5HNSuZE3MbqKDS2OSLQOh0JHNiAfFpCrGMzCUGAfSFTLA0ywjU0VeUu9wOMRMjEhNmsLMKMxlnrV5EXE2FvTaAT64QFllAdKQvW1ZhoQhaZFRejlVNbupcbb8wN8NNgdtRshvfOd8E2Rr3x8ZbJj/uDT+dMIa9MWf7zhj/C518k= X-MS-TrafficTypeDiagnostic: DM2PR12MB0153: X-Microsoft-Exchange-Diagnostics: 1;DM2PR12MB0153;20:0R8ulHJaavx5/DOsY3T9oMxdXwaGZBkGsNSXRKyio4UnQgAB4rKGoTF1pyfllEjpIH9bE9LAvcBILXCCVwBuutwKyMSMXSRwRlu8Iey3H/0DmyzcvsLmvm1VMmf/hq3IN/tA95YXwU+U4sXMpf5ijBMzhG2ww4Kh89Btm9Q1ScCyl/nGiJmF+O+ckB1FcTWbQBsv3c9pE/zGqmAi5e96OjxbmzeNhiQXSnfF+5pS5WWXCAtO4APGFbisq9nZ/FQgEY1v6w8olY8kpm/dvjlU+kElTAdCfidUHoKUiZI9GqWc0i8SElVEEO+E8KPfRQGP24TFUYpC16zJ2sI55sDf41i+q8TZqMmuozlsK7spN8fk4fPlHaLjiHk8NjF7oQkAxQsEdJQRCTzvamM+0zfrKZwld7//9njPayNFj4mJRn9BRniEIo5D7W7Fx8MFw9lSbBXIZdLiSuFsPRuTqCLdUgnxdF+s2Jw+F0xXm1vTtMw1siEr18vJVbdmbYF9udTz;4:nrTuHa51+bEALIWs0IonrLEJ3aUc/bETyvTyynRqEhrvskpjiIR9Ta9e9aSJr+G02Si+YNiP/OMbPDFt1ZawqNSyXm5KvNXfygvoJuvupBD3zUmidzcT6kPiJTW5EJtjMCpLcLVaFdguRJKdToi38BtBl+KMyMl+l7ssrvylrKdwJXbOfZrYh//sFS8c+KoQiOVGqVfHzcDr6xdvXk0VJQ8P6ThDaY1VJFS47iGQlbZmSdn7Zc2SAtvULr2DK+B3zE+rwGslbfW1akkk6roM5rYxCuLss/sdgoHs/FRWQ6cFJCbOg5wM8xFJTxoxtR7KwdI3pKMmvTM9gQ9RxRPJoA== X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(84791874153150); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM2PR12MB0153;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM2PR12MB0153; X-Forefront-PRVS: 0422860ED4 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(6049001)(39860400002)(377454003)(189002)(199003)(24454002)(81156014)(6666003)(2950100002)(6306002)(42186005)(7416002)(77096006)(6486002)(50466002)(31686004)(101416001)(15650500001)(229853002)(7736002)(76176999)(189998001)(54356999)(8936002)(305945005)(65826007)(2906002)(105586002)(8676002)(3846002)(81166006)(6116002)(106356001)(50986999)(966005)(53546010)(6916009)(4326008)(54906002)(86362001)(33646002)(575784001)(64126003)(230700001)(110136004)(554214002)(4001350100001)(97736004)(47776003)(68736007)(83506001)(31696002)(53936002)(478600001)(65956001)(23676002)(66066001)(6246003)(25786009)(36756003)(65806001)(5660300001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR12MB0153;H:[10.236.136.62];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTJQUjEyTUIwMTUzOzIzOmFZVDlVcncxWDFCa0tOWTlPUWV0QThla1RD?= =?utf-8?B?VXJvaHAzY1o5WFZCT0RJZFp6ZzFHWFc4UEpudUh4WXcwUHBOdS9rMUlZSzNO?= =?utf-8?B?OUlkYi94K0RkQUZkYWcvSytlY0dteUxsSlIrMC9oSWFOQVBENlg4K2VhUk1D?= =?utf-8?B?Q0ExeWVTdE5oOTE4d201M2ZoalM2Q0Y5bzFmNWV6WnJzVU1QcVE0bjU4NWFX?= =?utf-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kbacFaDTfNa95kN9e4GkLuHxrrHEPLmpg4auEMbPZqXIbsm+jtCFb7zB98ve2ONz22KqB/4MYCAA7aLz4xDEQIJwGKymePugtspgYJMZabhRlizDedRlDinuPUduGNN/KEdCmWDbTta7A15LLt1eWHvF X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2017 20:38:41.3861 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0153 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2206 Lines: 63 Hi Boris, On 09/06/2017 12:00 PM, Borislav Petkov wrote: ... > -------------------------- > |diff --git a/drivers/crypto/ccp/sp-dev.c b/drivers/crypto/ccp/sp-dev.c > |index a017233..d263ba4 100644 > |--- a/drivers/crypto/ccp/sp-dev.c > |+++ b/drivers/crypto/ccp/sp-dev.c > -------------------------- > > What tree is that against? In any case, it doesn't apply here. > >> This RFC is based on tip/master commit : 22db3de (Merge branch 'x86/mm'). > This bit of my struggle -- tip/master is not in sync with cryptodev-2.6 [1]. In order to expand the CCP driver we need the following commits from the cryptodev-2.6 57de3aefb73f crypto: ccp - remove ccp_present() check from device initialize d0ebbc0c407a crypto: ccp - rename ccp driver initialize files as sp device f4d18d656f88 crypto: ccp - Abstract interrupt registeration 720419f01832 crypto: ccp - Introduce the AMD Secure Processor device 970e8303cb8d crypto: ccp - Use devres interface to allocate PCI/iomap and cleanup I cherry-picked these patches into tip/master before starting the SEV work. Since these patches were already reviewed and accepted hence I did not include it in my RFC series. I am not sure what is best way to handle it. Should I include these patches in the series ? or just mention them in cover letter ? I am looking for suggestions on how to best communicate it. thanks [1] https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/ My staging tree on github contain these precursor patches. > $ git show 22db3de > fatal: ambiguous argument '22db3de': unknown revision or path not in the working tree. > > Do you have updated version of the series which you can send out? > >> @@ -67,6 +74,10 @@ struct sp_device { >> /* DMA caching attribute support */ >> unsigned int axcache; >> >> + /* get and set master device */ >> + struct sp_device*(*get_psp_master_device)(void); >> + void(*set_psp_master_device)(struct sp_device *); > > WARNING: missing space after return type > #502: FILE: drivers/crypto/ccp/sp-dev.h:79: > + void(*set_psp_master_device)(struct sp_device *); > > Don't forget to run all patches through checkpatch. Some of the warnings > make sense. > > Thx. >