From patchwork Fri Oct 20 20:45:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawan Gupta X-Patchwork-Id: 156307 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp1315713vqb; Fri, 20 Oct 2023 13:46:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHt/GYYHXAATzrGHAhoXfzdhtL8Kbt2CUUzEAbG7XnETrpS9Ay8heGY99nb57tKm8lQVGW X-Received: by 2002:a17:903:247:b0:1c3:64f9:45ad with SMTP id j7-20020a170903024700b001c364f945admr3810220plh.48.1697834774897; Fri, 20 Oct 2023 13:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697834774; cv=none; d=google.com; s=arc-20160816; b=d1MxuVtxMwW06Y/6rX3GLWOu2dtF/E40KqiOg0nPg7W1N21Oym8MrNV9NfLAxAu7SH BVBc5bkxx/5JfrlTJIr9uD+poxFl/FwqippxkpM6ziVxBPKYUrZvXoDZk5Z/K5ALD8fJ m5fNlvvE4TIVWH/Y3VjKMbysifGU1NU2JPdo7RNvUFypIpUpCM3pLqa09jrJE7OSoV/E A3N3TK5HET6FvQdjP2oqgPW8JmXYEjAv+u8Yup35dER+3lfaeKlgm/QSmoPAFH1DvT58 mPVoyZUhWblLlx0HVuC+jeEL9oBeqfw0jb+ZBmv34psUi/bVSCzDrSiJu/MzxEprnpPz bfwA== 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=p/tOFzXLLWREH1+FIFM9uUiLRon5jnteFfuqnh9KevE=; fh=lbJsPO+ZRDN9baDq/BZnnNH6CGOpZtNT0YCi3hapTHQ=; b=FailHB6fww7Xdy4bg6ZGWZ4EQjQw+nZ3lTPkVIH8WQwrxyCNrtgTTQwWhSSr3uUemQ EN9rWj5xpmAtR5q3jT3XH1gv8dvl8nILoHO/gf5MtTHPck9xgsXNZm9RhOM3kGQ3ulIo jdUiDInuhWFqhJUSeAE20Zl3vFxvgaicvx3uyZvH78JaiMSMvqJcR+bnofvWZ9Ry4Ucy 5JhigD2tkqDyemZ3odssvdHBo0E89t8Xs3ZL2phMgulZavwZ8qVMCXaLFDQndeXt/5dd CYcymp+zfaaWLkpDrSkaqsM4HOwHUXWxRcUTU+KUno4yaEf99REEGjAjATUtoTFoXued jQ7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DYdLoAt5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id j17-20020a170902c3d100b001c45291b6ebsi2340354plj.272.2023.10.20.13.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 13:46:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DYdLoAt5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 02F7B8266520; Fri, 20 Oct 2023 13:46:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232788AbjJTUpt (ORCPT + 26 others); Fri, 20 Oct 2023 16:45:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231792AbjJTUpf (ORCPT ); Fri, 20 Oct 2023 16:45:35 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDFEF1703; Fri, 20 Oct 2023 13:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697834726; x=1729370726; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=MYGTJ5cvnXWg6uwlltOdXM4ZAEsPGA4t+1Vpxa3NQlw=; b=DYdLoAt55s+cLosXIgh1ArQH+Bz73e2aIAgqNFFYlcz7uMpCMGb2WDaJ Bqgn9zPbX9GZZAp+J3ge3DIa4Lgleem+ZA0BKZXs35KPBWmY1a/a7jKBH ODBEUqQKL2ddwyFbCPCHf/y2K3m/0vW4rJpVBDUBSERW6sGj62SfJULwZ of4BP6YD28YaFQcA+M/Ru5hRTn/4NcBFZDfzQlNJJ6mYVMFSFLJBbCHXC HoAnYNbz0gWrERcUcZ21wY6IR1FXQLVFWZ7+dUkx45cyM9AwKsatG6j8h fQR8GpL6PqQm4PVsDjqsMEPTqEtSFurcyuZ0nHzudJac9KtpAqWI5mLRD A==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="365909429" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="365909429" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 13:45:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="848201758" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="848201758" Received: from hkchanda-mobl.amr.corp.intel.com (HELO desk) ([10.209.90.113]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 13:45:23 -0700 Date: Fri, 20 Oct 2023 13:45:22 -0700 From: Pawan Gupta To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Josh Poimboeuf , Andy Lutomirski , Jonathan Corbet , Sean Christopherson , Paolo Bonzini , tony.luck@intel.com, ak@linux.intel.com, tim.c.chen@linux.intel.com Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, Alyssa Milburn , Daniel Sneddon , antonio.gomez.iglesias@linux.intel.com, Pawan Gupta Subject: [PATCH 5/6] x86/bugs: Cleanup mds_user_clear Message-ID: <20231020-delay-verw-v1-5-cff54096326d@linux.intel.com> X-Mailer: b4 0.12.3 References: <20231020-delay-verw-v1-0-cff54096326d@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231020-delay-verw-v1-0-cff54096326d@linux.intel.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 20 Oct 2023 13:46:07 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780308796547573123 X-GMAIL-MSGID: 1780308796547573123 There are no more users of mds_user_clear static key, remove it. Signed-off-by: Pawan Gupta --- arch/x86/include/asm/nospec-branch.h | 1 - arch/x86/kernel/cpu/bugs.c | 3 --- 2 files changed, 4 deletions(-) diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h index 501c26ecd722..520689325014 100644 --- a/arch/x86/include/asm/nospec-branch.h +++ b/arch/x86/include/asm/nospec-branch.h @@ -563,7 +563,6 @@ DECLARE_STATIC_KEY_FALSE(switch_to_cond_stibp); DECLARE_STATIC_KEY_FALSE(switch_mm_cond_ibpb); DECLARE_STATIC_KEY_FALSE(switch_mm_always_ibpb); -DECLARE_STATIC_KEY_FALSE(mds_user_clear); DECLARE_STATIC_KEY_FALSE(mds_idle_clear); DECLARE_STATIC_KEY_FALSE(switch_mm_cond_l1d_flush); diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 75fc0a70877f..cf2181b45055 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -111,9 +111,6 @@ DEFINE_STATIC_KEY_FALSE(switch_mm_cond_ibpb); /* Control unconditional IBPB in switch_mm() */ DEFINE_STATIC_KEY_FALSE(switch_mm_always_ibpb); -/* Control MDS CPU buffer clear before returning to user space */ -DEFINE_STATIC_KEY_FALSE(mds_user_clear); -EXPORT_SYMBOL_GPL(mds_user_clear); /* Control MDS CPU buffer clear before idling (halt, mwait) */ DEFINE_STATIC_KEY_FALSE(mds_idle_clear); EXPORT_SYMBOL_GPL(mds_idle_clear);