Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752469AbeAEQmu (ORCPT + 1 other); Fri, 5 Jan 2018 11:42:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33940 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163AbeAEQmr (ORCPT ); Fri, 5 Jan 2018 11:42:47 -0500 Date: Fri, 5 Jan 2018 17:42:45 +0100 From: Andrea Arcangeli To: David Woodhouse Cc: "Van De Ven, Arjan" , Paul Turner , Linus Torvalds , Tim Chen , Thomas Gleixner , Andy Lutomirski , Greg KH , "Hansen, Dave" , Andi Kleen , Linux Kernel Mailing List Subject: Re: [PATCH 0/7] IBRS patch series Message-ID: <20180105164245.GW26807@redhat.com> References: <1515093549.29312.11.camel@infradead.org> <1515162514.29312.131.camel@infradead.org> <0575AF4FD06DD142AD198903C74E1CC87A56B309@ORSMSX103.amr.corp.intel.com> <1515166704.29312.140.camel@infradead.org> <20180105160534.GR26807@redhat.com> <1515170250.29312.144.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515170250.29312.144.camel@infradead.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 05 Jan 2018 16:42:47 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Fri, Jan 05, 2018 at 04:37:30PM +0000, David Woodhouse wrote: > You are completely ignoring pre-Skylake here. > > On pre-Skylake, retpoline is perfectly sufficient and it's a *lot* > faster than the IBRS option which is almost prohibitively slow. > > We didn't do it just for fun. And it's working fine; it isn't *that* > complex. How do you enable IBRS when the CPU switches to SMM? Do you already have this 2-way code emission from gcc and patching with a 3-way alternatives at boot between ibrs and 2 reptoline version emitted by gcc and alternatives between ibrs and ibpb where SPEC_CTRL is missing on some CPU but IBPB_SUPPORT is available? Or are you talking about having done this on a non upstream Xen build only without the 2-way code emission for gcc?