Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752568AbdCEA5D convert rfc822-to-8bit (ORCPT ); Sat, 4 Mar 2017 19:57:03 -0500 Received: from terminus.zytor.com ([65.50.211.136]:32852 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752296AbdCEA5C (ORCPT ); Sat, 4 Mar 2017 19:57:02 -0500 Date: Sat, 04 Mar 2017 16:56:38 -0800 User-Agent: K-9 Mail for Android In-Reply-To: <20170305003349.6kgq4ovj7ipezfxu@pd.tnic> References: <20170304224341.zfp4fl37ypt57amg@pd.tnic> <5CCEF10D-5647-4503-A398-0681DF2C8847@zytor.com> <20170305001447.kcxignj3nsq35vci@pd.tnic> <20170305003349.6kgq4ovj7ipezfxu@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: Question Regarding ERMS memcpy To: Borislav Petkov CC: Logan Gunthorpe , Thomas Gleixner , Ingo Molnar , Tony Luck , Al Viro , the arch/x86 maintainers , Linux Kernel Mailing List From: hpa@zytor.com Message-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 889 Lines: 22 On March 4, 2017 4:33:49 PM PST, Borislav Petkov wrote: >On Sat, Mar 04, 2017 at 04:23:17PM -0800, hpa@zytor.com wrote: >> What are the compilation flags? It may be that gcc still does TRT >> depending on this call site. I'd check what gcc6 or 7 generates, >> though. > >Well, I don't think that matters: if you're building a kernel on one >machine to boot on another machine, the compiler can't know at build >time what the best MOVS* variant would be for the target machine. >That's >why we're doing the alternatives patching at *boot* time. > >However, if the size is small enough, the CALL/patch overhead would be >definitely too much. > >Hmm, I wish we were able to say, "let gcc decide for small sizes and >let >us do the patching for larger ones." That's what the -march= and -mtune= option do! -- Sent from my Android device with K-9 Mail. Please excuse my brevity.