Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3856imw; Tue, 12 Jul 2022 13:21:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uhOtYHl/NVTNmhAkBekyzF1yx5ktW091vDV2e1bak4nqkxoAeKAUcao7YqpvzexQL6Wf+f X-Received: by 2002:a17:902:c411:b0:16c:28e3:c33d with SMTP id k17-20020a170902c41100b0016c28e3c33dmr14727plk.126.1657657143276; Tue, 12 Jul 2022 13:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657657143; cv=none; d=google.com; s=arc-20160816; b=b1bhwVNwS0ePqaTNvqmLGVXJuPYtRppsjwdeja5hiss+H03FGHEgB9WBHVHTcO3fFW yOJBNKmxsH+Z72yw5VKQE7c3a7LY4DaRLYpZaeC3DYWUXcnjb4jlwVyxrWh41qMX7S+l fQ/mM9lmtXLfuL5WtYWF0bBUhbbucXVCOrp7CY/Gjojhktcvw8j+iK62Od1+qFzzLAvq tgA4i1g69GlK1J2pMt/mdlbp1n8Z81ERf0U+yqnuNv/9Fij6cHq01gYxyhJwNVdvNEIR TJ4NkIGIRqrF+QHsUlqpB2hcHWNVH9n9na6GSvlJDGkB4pW5W3Jplh9xiv9OV1pTXIH5 r/Og== 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=lwAXl2S/HGF8TlQ41J2KafY9COE/O8uGQBIv5IP5Ax3LPB3uUjsIm4Rr/8pBu4JxgW hxAFCuhxbMMz1qibD9jYcwvfM5g1CBOHD5jDOKc2j5mdt3sJxT0Lro4LGd2mKF3luEoC sIOhlXFFB0LQ4DjWfGWtZKL3XhkyritYNBSw/Qe0QOq0+BGXYSlgds3GJzbC7ZY5s5QF BR+gLdFOYiUlc2iVHlwYj1yu42kr/9Vicr5DXxQ2EoNH/DieIgPXa00haeKr6wx7Iycx Wk8MpaW5uERGuOffeoXxb3/au74k5JtFymRe9UtmjGQ4Fa1qKx8Ksz9hNuFYnU434rIL meRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bDkYbpAh; 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 q4-20020a17090311c400b0016a2bfe5c7csi19158457plh.172.2022.07.12.13.18.48; Tue, 12 Jul 2022 13:19:03 -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=bDkYbpAh; 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 S234871AbiGLSzF (ORCPT + 99 others); Tue, 12 Jul 2022 14:55:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234946AbiGLSyX (ORCPT ); Tue, 12 Jul 2022 14:54:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E946FE95C8; Tue, 12 Jul 2022 11:45:52 -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 ams.source.kernel.org (Postfix) with ESMTPS id 43D3EB81BBC; Tue, 12 Jul 2022 18:45:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8EB57C3411C; Tue, 12 Jul 2022 18:45:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657651547; bh=ByLN6L1kQ5tDLJy2YF+90FMHIkenQB5ANQ1jfWxqXcU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bDkYbpAhtqyxhI/+7YjleyoKa5J6jScPBjHs1jMevD8yE0JKUXycvvARVd4OcheA7 /Pe6bkQ3B0445nruYCWH4Gce9T8N9/gnwfDJczJmaJrZCZyjviFZSXZEH/G3CkJccr sMNSbmIv8JUTWg4iXJmZ7xYL1tvUv0DiHKLvD8ro= 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/130] x86/cpufeatures: Move RETPOLINE flags to word 11 Date: Tue, 12 Jul 2022 20:38:45 +0200 Message-Id: <20220712183250.109497033@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220712183246.394947160@linuxfoundation.org> References: <20220712183246.394947160@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.7 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,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 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 */