Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1364904imi; Sat, 23 Jul 2022 03:45:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uVez1vR/WMXNeIRR6pu7utPj7dvsuOnyHUJB3oprtEQilhhCS6+OzDs8F3EjGXBwkRDUJR X-Received: by 2002:a17:90b:4a4d:b0:1f2:5211:e8d6 with SMTP id lb13-20020a17090b4a4d00b001f25211e8d6mr4313735pjb.96.1658573129234; Sat, 23 Jul 2022 03:45:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658573129; cv=none; d=google.com; s=arc-20160816; b=atFqBIMI/Nc2lBTeBZ+Sdklr3ATwh1odNClkep1Kub8Fg1FkpFHDI2g3og4IRl+B1o 8HKymPhGATTnC4Y2BMWZGXX41PVH9wDaZztWRnKHRN4zAQGzoRcoL30EgcuahdCLZyCk 9KUmW4SBkTPTgjPvchdX/6TSvxYZVwiN5SjeDtHaK1XP0+YophvTkXSpM+2YPFa4gTKe SYSD8X7qh0HL+2urvf1aBpvFPf/XV7dm0CHmRl5n10zIucTRdv5sP7GfuZbBycWZk9za As4gNdGFMFWda0rgqTK33gxtGh0+CKmwB3KCDv39lvnvEiixx4vTm1jsGSXvlQCn2B/1 N5ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kL5fSosJn6c6OTPQGzdS2ntKM3OGL5UyJJfoqYiKrGM=; b=xJnP8vd8XlKnmx6TW/r81eAhKwCTH6yT8xuQprsGtfsw7zJuhZCpk01ibWO5ghgcLy l3CcpgEzCTDzfPXIeZdbI0Um+fFiNDqi86zAfXp1mFDR7+E5bliGT2v3wqmqMAQlc43z 40NiGD/nZjYHgZsCWFrf92r/7fRlp/LbEfHBp/rUzvTCJ4m7GDGaGlKh0gN/k7C8vOU4 yTt+qFeVrPb+z6G7C81fiCo/s8q1+ujCV3UmLfPHJhRegKnoqZOIuuuXt2HOHdvq3t6m CvkDAmWGf+cMHYQDzy4038a76tAEfjgdzQvVhSz3cYrUlL6GkHu8maXjmfJNFV7FosYW p70Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=suiovti4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e11-20020a170903240b00b0016252715440si196294plo.494.2022.07.23.03.45.14; Sat, 23 Jul 2022 03:45:29 -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=@linuxfoundation.org header.s=korg header.b=suiovti4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238365AbiGWKFp (ORCPT + 99 others); Sat, 23 Jul 2022 06:05:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238219AbiGWKEn (ORCPT ); Sat, 23 Jul 2022 06:04:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37DAE16598; Sat, 23 Jul 2022 03:00:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CF89761204; Sat, 23 Jul 2022 10:00:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9AA2C341C0; Sat, 23 Jul 2022 10:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658570416; bh=ByLN6L1kQ5tDLJy2YF+90FMHIkenQB5ANQ1jfWxqXcU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=suiovti4hXv+tpcLUAXPTqf9EkhdXdAAZxBzRNl1uQlV/1/sV0y/j20JQz1mjbM7H yLos+NKl+wQi8JnOl1xi+TmqGCWK7bQ2bsoyEjRrmpIxBbNpe6njK1h+utseimA6s3 baxKCBvJZwfKqWC4ftM31OKpdDjhKeVKR7BfDhY8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Peter Zijlstra (Intel)" , Borislav Petkov , Josh Poimboeuf , Thadeu Lima de Souza Cascardo , Ben Hutchings Subject: [PATCH 5.10 079/148] x86/cpufeatures: Move RETPOLINE flags to word 11 Date: Sat, 23 Jul 2022 11:54:51 +0200 Message-Id: <20220723095246.400129259@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220723095224.302504400@linuxfoundation.org> References: <20220723095224.302504400@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 From: Peter Zijlstra commit a883d624aed463c84c22596006e5a96f5b44db31 upstream. In order to extend the RETPOLINE features to 4, move them to word 11 where there is still room. This mostly keeps DISABLE_RETPOLINE simple. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Reviewed-by: Josh Poimboeuf Signed-off-by: Borislav Petkov Signed-off-by: Thadeu Lima de Souza Cascardo [bwh: Backported to 5.10: bits 8 and 9 of word 11 are also free here, so comment them accordingly] Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/cpufeatures.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -203,8 +203,8 @@ #define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */ #define X86_FEATURE_SME ( 7*32+10) /* AMD Secure Memory Encryption */ #define X86_FEATURE_PTI ( 7*32+11) /* Kernel Page Table Isolation enabled */ -#define X86_FEATURE_RETPOLINE ( 7*32+12) /* "" Generic Retpoline mitigation for Spectre variant 2 */ -#define X86_FEATURE_RETPOLINE_LFENCE ( 7*32+13) /* "" Use LFENCE for Spectre variant 2 */ +/* FREE! ( 7*32+12) */ +/* FREE! ( 7*32+13) */ #define X86_FEATURE_INTEL_PPIN ( 7*32+14) /* Intel Processor Inventory Number */ #define X86_FEATURE_CDP_L2 ( 7*32+15) /* Code and Data Prioritization L2 */ #define X86_FEATURE_MSR_SPEC_CTRL ( 7*32+16) /* "" MSR SPEC_CTRL is implemented */ @@ -290,6 +290,12 @@ #define X86_FEATURE_FENCE_SWAPGS_KERNEL (11*32+ 5) /* "" LFENCE in kernel entry SWAPGS path */ #define X86_FEATURE_SPLIT_LOCK_DETECT (11*32+ 6) /* #AC for split lock */ #define X86_FEATURE_PER_THREAD_MBA (11*32+ 7) /* "" Per-thread Memory Bandwidth Allocation */ +/* FREE! (11*32+ 8) */ +/* FREE! (11*32+ 9) */ +/* FREE! (11*32+10) */ +/* FREE! (11*32+11) */ +#define X86_FEATURE_RETPOLINE (11*32+12) /* "" Generic Retpoline mitigation for Spectre variant 2 */ +#define X86_FEATURE_RETPOLINE_LFENCE (11*32+13) /* "" Use LFENCE for Spectre variant 2 */ /* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */ #define X86_FEATURE_AVX512_BF16 (12*32+ 5) /* AVX512 BFLOAT16 instructions */