From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 692E333EAF4 for ; Thu, 16 Oct 2025 14:23:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760624641; cv=none; b=kLe9kMiujyYX0V4XcziVq/Bl+F5kasNWfcnQX+F5riDUUM9ECoyucJO8lc7Fkgw+TXLVK3QK5CF6Xjrq1oLztgJ+H2y4S25pGs55idGms5/IIwKaNKk6xyYCQqfmbo5y0OaImfBPXNthjLCES+rLa+YCN6HxJCI9y0pff1bERk0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760624641; c=relaxed/simple; bh=E+wNyAuIJoFDEuv1C0VMJx4QWwJugwFMwrmGN7GGo1Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=unvENN5F2QO5S603wHveQSxK+fwnClw9P3e6s4YTE+nxhLizbh/LiVg1sd9nXXVnD0SGZwB4agV21v+zK8wXKWZQMb4OzjXdLQz6L3nFkhZXssR1mcY/q/GBbfZ7KrPbygnG7VEoBDd653Y6NLLjdWbn97bglMg4ZiynxYuBU3g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=lHDdzPgG; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="lHDdzPgG" 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=ZKdf/K8sl+1APrizLcOU21JGNAAJoPeFfvKXPb5UfOI=; b=lHDdzPgG+0RrAfGzJDq5fQSuSI 5nFqoLgmCqZ7TuY6B5Hqtoj+WAMKBmB7T3CkGC2fUIo2veuAPUn2jSbEp8q7LE9h2P7ey6cZm6xDg ERLSUb5e4PC62XnbmhvIWkaAV76nHZg+W7f8KxZZWov3a5hsHTsC2cRxvzMQKgje8aVzbA5uiY58d tBWldWrvBEF7Fz5tYlg59EAJTGKnlE9BUdTQ2r0l2IUJDMnPsRjMjBPD1uazYt7V2ro7fDOB82ewH xAq9JvzHl+/9JHNanlzHxvBkt1KuCWpiR/JM86cuLdyMcHpRM6M67qJhiiCjLhOImmZ3eZ4wmf1yu 8EyME24w==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1v9OtO-00000005gr7-4BzC; Thu, 16 Oct 2025 14:23:48 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id BC97C30023C; Thu, 16 Oct 2025 16:23:47 +0200 (CEST) Date: Thu, 16 Oct 2025 16:23:47 +0200 From: Peter Zijlstra To: "Kaplan, David" Cc: Thomas Gleixner , Borislav Petkov , Josh Poimboeuf , Pawan Gupta , Ingo Molnar , Dave Hansen , "x86@kernel.org" , "H . Peter Anvin" , Alexander Graf , Boris Ostrovsky , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH 31/56] x86/alternative: Prepend nops with retpolines Message-ID: <20251016142347.GV4067720@noisy.programming.kicks-ass.net> References: <20251013143444.3999-1-david.kaplan@amd.com> <20251013143444.3999-32-david.kaplan@amd.com> <20251016110717.GE3289052@noisy.programming.kicks-ass.net> <20251016112327.GQ1386988@noisy.programming.kicks-ass.net> <20251016140731.GS4067720@noisy.programming.kicks-ass.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Oct 16, 2025 at 02:16:04PM +0000, Kaplan, David wrote: > > Yeah, makes sense. But I like I wrote, I think prefix stuffing might be > > a better option. > > Ok, and that's because we need at most 3 prefixes as Intel uarch's > don't have significant penalties at 3 prefixes, only at 4+? Yeah, IIRC 3 was the magic number. Sadly there isn't much public information on this. The best summary on the subject I could find was here: https://reviews.llvm.org/D75945 > I'll need to check on this on the AMD side too. The above, quoting Agner's optimization guide, says Bulldozer is affected.