Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp514864pxb; Thu, 31 Mar 2022 10:26:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaHCjdipWXZwKNkVl4cJwBDNha3UW6HLapqi1rZYUJOoXH/ro51uxfyi43y9OhJuDIY+HC X-Received: by 2002:a17:906:57c1:b0:6d6:da73:e9c0 with SMTP id u1-20020a17090657c100b006d6da73e9c0mr6064995ejr.45.1648747600772; Thu, 31 Mar 2022 10:26:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648747600; cv=none; d=google.com; s=arc-20160816; b=cijSfvSJ+M785RLrzhfZ6NHk9jCOolJxORas9aAID40Oq5MDrlfgxJ6kRCbEctpYap n8/uI+vhTnWgH6aoASGPsa3n3Zqj9A9TvkicEXcZNZeDv+SLcfkqjC/stKQGJPzW3b7j Z5d/ceB6eSUHCY0WmIENrPIpt5obIx5r8uNHMdl1smSnwofr9OkR9kVyYFFGYkLTg43s DvAQW29zrgvYLUnnEzX+rqcazEtRJuiOiaYj9gO2drql3hrZo5Vily/v1adpbBy+fHYp yVKuZYOEa+Y77x+Ir8LWCxrJBETj0w+AqzfNu4zyCeDyZ4Y8Nj9VuXRztB+GhJKJ1CNN xVaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=ZHYuqeKJnzEN55VinKARygxDGwAlk2OUMAGWJjsEkn0=; b=llv0vGGC1bXS3r03ZbFIVSKKJqqFNz/RNRuCCWgn7HruBncZJ7w40bYTeRJXge2qPP IAJyTF1+Cs1/nNeeQnWCuPllOT1MZmhihcN3jyEis8FZWgZvuem51GP0oo6sjTl/fgfK dl+GcAOSLTOJoreefxBQEWcO2OPRlFypVK98S4/ySs1g7R5b4HiCHGrhBinbm94yMFHu z3EywM3H707FBlI5zFPae4t88Nj63Fb1oAIUKxJ/xr8ItI/q68Kbp3W/L4LcTBicLx1U RLTIzzUG/xk3DsO1J3pbL4ZIKY89LjQd8BXH2JoBZzzdkC3riCz8qlnHJuykUU/FWCB1 VX3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=J6VmftH1; dkim=neutral (no key) header.i=@linutronix.de header.b=nKTSEdDS; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a18-20020a1709063e9200b006df76385ee9si65862ejj.905.2022.03.31.10.26.14; Thu, 31 Mar 2022 10:26:40 -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=@linutronix.de header.s=2020 header.b=J6VmftH1; dkim=neutral (no key) header.i=@linutronix.de header.b=nKTSEdDS; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233577AbiCaJDI (ORCPT + 99 others); Thu, 31 Mar 2022 05:03:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233477AbiCaJCt (ORCPT ); Thu, 31 Mar 2022 05:02:49 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7FA553E2C; Thu, 31 Mar 2022 02:01:02 -0700 (PDT) Date: Thu, 31 Mar 2022 09:00:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1648717261; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZHYuqeKJnzEN55VinKARygxDGwAlk2OUMAGWJjsEkn0=; b=J6VmftH1YDIqwEXxIQz1ucJSf9CwdQrMuGvrMKnKL/HXk5RG7Gl7lBU0vscOU8SCWUW5sf JwksjtgAoV95KE+R0UmAA6nOwFnzK4qjs0MIO33yK70AaBVfpGL1TorEs5ft3dTvhLQPBo H7kA8M7o9NyuFo7zKeQKlqzZo666+XBOHSobJetE6BzePXKPxOXwJ3dZFKFoY9eGaECCZ+ CQpnaPyhzlluO1YcvqJ8SU+jLmtswFddITrWBmJ7BCEDv7O/ZWO10J9aCCE17jvGFtG22v mkCzPtNcZAdXLDVEpkl6W6Vf8WwA4mSr0w3V7h9iUwEZdNSLlpfAzZrsrOdAxA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1648717261; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZHYuqeKJnzEN55VinKARygxDGwAlk2OUMAGWJjsEkn0=; b=nKTSEdDSM2g3EW9jn9DWkqgbuONzaDxmtRIcBk4ZIhskoX/cMmeiq/9md2B3xhvrYKpK8v xudUPpAIvhqHdHBw== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/fpu: Remove unused supervisor only offsets Cc: Thomas Gleixner , Borislav Petkov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220324134623.465066249@linutronix.de> References: <20220324134623.465066249@linutronix.de> MIME-Version: 1.0 Message-ID: <164871725930.389.263374082981753847.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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_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 The following commit has been merged into the x86/urgent branch of tip: Commit-ID: d47f71f6de7970d504748d1a60a11c51af5bce47 Gitweb: https://git.kernel.org/tip/d47f71f6de7970d504748d1a60a11c51af5bce47 Author: Thomas Gleixner AuthorDate: Thu, 24 Mar 2022 14:47:09 +01:00 Committer: Borislav Petkov CommitterDate: Wed, 30 Mar 2022 10:44:51 +02:00 x86/fpu: Remove unused supervisor only offsets No users. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220324134623.465066249@linutronix.de --- arch/x86/kernel/fpu/xstate.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c index dc6d5e9..dc33556 100644 --- a/arch/x86/kernel/fpu/xstate.c +++ b/arch/x86/kernel/fpu/xstate.c @@ -83,8 +83,6 @@ static unsigned int xstate_sizes[XFEATURE_MAX] __ro_after_init = { [ 0 ... XFEATURE_MAX - 1] = -1}; static unsigned int xstate_comp_offsets[XFEATURE_MAX] __ro_after_init = { [ 0 ... XFEATURE_MAX - 1] = -1}; -static unsigned int xstate_supervisor_only_offsets[XFEATURE_MAX] __ro_after_init = - { [ 0 ... XFEATURE_MAX - 1] = -1}; /* * Return whether the system supports a given xfeature. @@ -325,33 +323,6 @@ static void __init setup_xstate_comp_offsets(void) } /* - * Setup offsets of a supervisor-state-only XSAVES buffer: - * - * The offsets stored in xstate_comp_offsets[] only work for one specific - * value of the Requested Feature BitMap (RFBM). In cases where a different - * RFBM value is used, a different set of offsets is required. This set of - * offsets is for when RFBM=xfeatures_mask_supervisor(). - */ -static void __init setup_supervisor_only_offsets(void) -{ - unsigned int next_offset; - int i; - - next_offset = FXSAVE_SIZE + XSAVE_HDR_SIZE; - - for_each_extended_xfeature(i, fpu_kernel_cfg.max_features) { - if (!xfeature_is_supervisor(i)) - continue; - - if (xfeature_is_aligned(i)) - next_offset = ALIGN(next_offset, 64); - - xstate_supervisor_only_offsets[i] = next_offset; - next_offset += xstate_sizes[i]; - } -} - -/* * Print out xstate component offsets and sizes */ static void __init print_xstate_offset_size(void) @@ -951,7 +922,6 @@ void __init fpu__init_system_xstate(unsigned int legacy_size) setup_init_fpu_buf(); setup_xstate_comp_offsets(); - setup_supervisor_only_offsets(); /* * Paranoia check whether something in the setup modified the