Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751471AbdIOONL (ORCPT ); Fri, 15 Sep 2017 10:13:11 -0400 Received: from mail-dm3nam03on0069.outbound.protection.outlook.com ([104.47.41.69]:55360 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751259AbdIOONI (ORCPT ); Fri, 15 Sep 2017 10:13:08 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Cc: brijesh.singh@amd.com, "H. Peter Anvin" , Arnd Bergmann , David Laight , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-efi@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "kvm@vger.kernel.org" , Fenghua Yu , Matt Fleming , David Howells , Paul Mackerras , Christoph Lameter , Jonathan Corbet , =?UTF-8?Q?Radim_Krcm=c3=a1r?= , Piotr Luc , Ingo Molnar , Dave Airlie , Kees Cook , Konrad Rzeszutek Wilk , Reza Arbab , Andy Lutomirski , Thomas Gleixner , Laura Abbott , Tony Luck , Ard.Biesheuvel@zytor.com Subject: Re: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active To: Borislav Petkov , Tom Lendacky References: <20170724190757.11278-1-brijesh.singh@amd.com> <20170724190757.11278-14-brijesh.singh@amd.com> <063D6719AE5E284EB5DD2968C1650D6DD003FB85@AcuExch.aculab.com> <201707261927.v6QJR228008075@mail.zytor.com> <589d65a4-eb09-bae9-e8b4-a2d78ca6b509@amd.com> <20170822165248.rkbluikdgduu7ucy@pd.tnic> <20170915122430.pnroy6vsg53warel@pd.tnic> From: Brijesh Singh Message-ID: <95314c89-2620-8bb7-cbe8-cd9bc3adabb0@amd.com> Date: Fri, 15 Sep 2017 09:13:00 -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: <20170915122430.pnroy6vsg53warel@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: DM5PR06CA0072.namprd06.prod.outlook.com (10.168.110.162) To CY1PR12MB0150.namprd12.prod.outlook.com (10.161.173.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f2947933-7f5b-4ee9-eb85-08d4fc43e1ea X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR12MB0150; X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0150;3:0Qv50jK6JZ8/A7PzsUTlSdZSnTWQEvSUvI32OkEMtekj5S1VMRil6BeKPDon+63v+LIuQ/pvITBOjoGj50p1ao7A5ICAQkMM7K3F/oROdfG4bjd8eJE9aoeAkSF2dQ4NhOhhNt6GaZ5oeM0QS3chdOSDz2AgAnFIPll9XWOugQ/+pAiDKZMaqQGfoEOGA9Z3sotX6eQo+P1Miwv8/aPsJIQhYIfICQclsUnG5c7pDrgzgEVXnFLAga1Lwf5sPtJa;25:JM1fFLYzwdw474AoKdkO/KykxSSJ3wUZ+AEcWCmqUMxtwxngqJ8tpkYMqWeLk7Jxkf9g+LWXTF5JNA0XQdm/t8zwn4buGcTthPeDQl3MvPPwSM0mlxFpJlOl6qGtbdwEEOPgPlX/kA7/0FVkEXnrUmiMrUkcvO/RDqY9t/0BwjB53Y7mfF/gJY6XMUnpfgF1nerEps3zjmgzTW4UePL0EF0B/H2VWV0+/nW+YEroWgmtwuJbPNQjvzaEJLQa+899vXSLcTNIgCrSmHrer3bpaTPjwPO39+QZt4/pBkyekHH8Djd7R9jNm+mA2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mpv+bgea0r0toX6+1 X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(20161123562025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(201708071742011)(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-Forefront-PRVS: 0431F981D8 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(6049001)(39860400002)(376002)(346002)(51914003)(199003)(377454003)(24454002)(189002)(189998001)(53936002)(16576012)(3846002)(6246003)(16526017)(68736007)(54356999)(6116002)(316002)(305945005)(7736002)(2906002)(83506001)(31696002)(53546010)(101416001)(230700001)(97736004)(478600001)(58126008)(76176999)(25786009)(4326008)(50986999)(54906002)(77096006)(47776003)(5660300001)(8676002)(90366009)(65826007)(6486002)(81156014)(6636002)(33646002)(2950100002)(65806001)(65956001)(7416002)(8936002)(81166006)(229853002)(106356001)(105586002)(66066001)(23676002)(86362001)(64126003)(93886005)(36756003)(50466002)(31686004);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR12MB0150;H:[10.236.136.62];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjEyTUIwMTUwOzIzOkxZWGxQb2p2R2R1VjVxUTVIN1hSbDI1dStj?= =?utf-8?B?VDJvbUVqWFdzYjdSN1VPYVdmbTRWWXZmQWd2RHNQUU5URTJoNk5taGdPb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cjgxOlT8pFM1imNyAy/nGRV+9WHYUOsb3qxnBS8dHBJgj2SGdQU7h6MLoGKVaR2fivD79QO4mNc1+N+8eGlu4PIvHmOVKGHFmooIIgFhlX9tkhRt4o1Za4+m8gcW+fY08NYcLXfxPzv+UkzDwuuM3r1EW5xeMAFKTUskwO7vE6d9fIxxjGGbFjp3+ymhDksGXREnuIPaBCHkJGz81t+x+hT7vJP4De5/FY+SubdgTMLL815 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2017 14:13:03.7172 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d 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: 539 Lines: 18 On 09/15/2017 07:24 AM, Borislav Petkov wrote: > On Tue, Aug 22, 2017 at 06:52:48PM +0200, Borislav Petkov wrote: >> As always, the devil is in the detail. > > Ok, actually we can make this much simpler by using a static key. A > conceptual patch below - I only need to fix that crazy include hell I'm > stepping into with this. > > In any case, we were talking about having a static branch already so > this fits the whole strategy. > thanks for the suggestion Boris, it will make patch much simpler. I will try this out. -Brijesh