Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1530496rwb; Fri, 19 Aug 2022 05:25:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR7g3ZiVPQJ1IRgM6aBTtCGuogMWoRIxedTWjRwq6eGaHfuPFiRYGTyOSMO43s13wABcWWIe X-Received: by 2002:aa7:c6d2:0:b0:445:be64:98b7 with SMTP id b18-20020aa7c6d2000000b00445be6498b7mr5876533eds.164.1660911917035; Fri, 19 Aug 2022 05:25:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660911917; cv=none; d=google.com; s=arc-20160816; b=qYDDh2QKNLTFuMd0rNqzWBIp/HZfHQWKnbtgRUyGMYz06wZqMWxfrmspPqUFS9h1oh T5ZwD8dg1w0hS/dWeRqwQEoALjh31U/Mli3r7QFVK6HC93Dw1p/I9bJxO0tSnFOJqpV5 5EXgDASAPg2Oak3jYIK+kntTCz23cae694zfA/ocok/Rx930ROroLLHD+8R78SGkpHAg m09sgXNvvvT6qW/zkV3lyKColdO+FX9cVxYisO6Rbw5sKVQG0A7yxIltba9htspK5iDY tZTXlL3XAHc0RncZYxnUlQzujdQw6ZsVY+m193UCzuQhACeMkFpw6pJy5mNQbGrC8Q5Y jaLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uJIjedYarczgR1fsBatrH00iIT2IriOKYXL6KyniivQ=; b=nmb2saZLzJpUt3ZcZy7W0sn499KcoFEEgyvVUtxZRZ71Zu/U/Z3p6Ngb4f9PrK5mLU jnEhhF68JV9s2f0qVSm4CyL8ngbECPuC9GpU7r3xkfVSznJA8iz4eVGHuOD+1Qf3FJGz kKkvtPgDhmxtB1yLQEH4e6yJ2kOFHYvo+8BYnMx0VHGaqAw8BEZf0XwZRiTY6HiQFa6h fXBFLF4utSi27+wG3asWDhUm8MYVJ+fMxwrL7HkqPwqt3+IYoi/SsnZ6Dbd3QSt/B8VP TesUjEKEaBL7sKip1W84DZ2Bu2joQGQC8X8Ywr4RDP+BSQc4XAvPQaDc59ADocHIlCgO s72g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=lVjBzwDn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js9-20020a17090797c900b00738553043e5si3084859ejc.573.2022.08.19.05.24.50; Fri, 19 Aug 2022 05:25:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=lVjBzwDn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348853AbiHSMQE (ORCPT + 99 others); Fri, 19 Aug 2022 08:16:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348495AbiHSMQC (ORCPT ); Fri, 19 Aug 2022 08:16:02 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38239100969; Fri, 19 Aug 2022 05:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=uJIjedYarczgR1fsBatrH00iIT2IriOKYXL6KyniivQ=; b=lVjBzwDnL3TrLWNLHk7fn3Zu5H uOneN7WQJLk3Ocvk6+5NHFKCHi7tRAShM40RhrUHtyho7QHrHAg9Gq8avL2auKCXw82/3DsATrxIt F3hHmQ/GZVrguU14SMnEi1xfiKp2iuBlEwpwe1KKSgKDtmA9SGJ+BqXAedD0JnDxVqpAQyIg4qqaS RhNgIJGA1P8YMmmiNOaRDxVc4CASWoh2Z6WsV5GwLITc0PsAkbTyKH4f66HcJh0TMFV+FqFwYi6Yk alrKd5oIBDJrz7hFmhwl4PIi0kemfNQnTOhstNfXVZ7F/ClCIyzzZAW3TEuqjTaBkBkLLt0oTPBjQ 8fRWd75Q==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oP0ui-00B6SB-EK; Fri, 19 Aug 2022 12:15:48 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 84B18980163; Fri, 19 Aug 2022 14:15:46 +0200 (CEST) Date: Fri, 19 Aug 2022 14:15:46 +0200 From: Peter Zijlstra To: Ben Hutchings Cc: x86@kernel.org, linux-kernel@vger.kernel.org, 1017425@bugs.debian.org, =?iso-8859-1?Q?Martin-=C9ric?= Racine , stable@vger.kernel.org, regressions@lists.linux.dev, Daniel Sneddon , Pawan Gupta Subject: Re: [PATCH] x86/speculation: Avoid LFENCE in FILL_RETURN_BUFFER on CPUs that lack it Message-ID: References: <9395338630e3313c1bf0393ae507925d1f9af870.camel@decadent.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9395338630e3313c1bf0393ae507925d1f9af870.camel@decadent.org.uk> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 19, 2022 at 01:38:27PM +0200, Ben Hutchings wrote: > So that puts the whole __FILL_RETURN_BUFFER inside an alternative, and > we can't have nested alternatives. That's unfortunate. Well, both alternatives end with the LFENCE instruction, so I could pull it out and do two consequtive ALTs, but unrolling the loop for i386 is a better solution in that the sequence, while larger, removes the need for the LFENCE.