From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (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 563823AAF47 for ; Wed, 29 Jul 2026 17:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=96.67.55.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785344897; cv=none; b=h6lYX5MsUZgLX2hKDtS/sRdg/SM1MvPGcTfgd4Zto/PubKJzp15z0nI1D/CgHWt7sFjlZaL6E1W7w+J/MaVp9Rg9/oBjIOpQjXRlWfdL8bOQHibPN7VoYZ9YiuQJOIPB6CyQfpxTbfJEennwKjOcUPOknFPo2KxqE5kXKj1AvE0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785344897; c=relaxed/simple; bh=YoIpqE0+eI1v8g5k9+M3qZeObRT0mh/ff4Wr9b4bOhI=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=M3K/uUgGCSlBz8niW2MQxAQArHudU7I6Q7kvIV+g0rO2FboE/7gKRRItpSHBAq0c9HLEpNujx5el7vl5zax0oaY1xhRfahMLdzUxf1JNCpz8V1eI4onq3byYhzkbaAeonwoDurfcg2pZUQ8PIxExmgPXF+iJhLXQcuKEhpxA/lw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com; spf=pass smtp.mailfrom=surriel.com; dkim=pass (2048-bit key) header.d=surriel.com header.i=@surriel.com header.b=ZB3FSXCZ; arc=none smtp.client-ip=96.67.55.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=surriel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=surriel.com header.i=@surriel.com header.b="ZB3FSXCZ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=surriel.com ; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=eUUKVpnIxwUZy38QocYXi9PxdF1VL37NN4dLKgd+m7o=; b=ZB3FSXCZfW9rHTT2LUnnN/OLmE E0ZvdD5LUPjas0cfI7h+Ff8zEUGsK05tXD93T7w0+uS/ZLVLdBq0iqAgauLbk0XBJhdqZ6xCes2wZ X0D4/dicQNrCBuliEWvrwCVdPxZ4oew7zIdfsVvlRGDk3WpVtvVI1mTMzgQsxY/kKbrMX0dMwmstR n3KXlaTYcnbhKIzTvgroCOrfvUbP9bp4I/I+UF6S6vOvxL7yybqjZtn4Ok/8n/9cMPni+GSnI8v5K y6DNe6NkLKN2Mclecuu754ULDeO2AzHkgxfvSCKuTvCkC7xNZdkuLrHVz/iD3nMz9vO0Itdn+djfX 7tduJnKQ==; Received: from [2601:18c:8180:83cc:5a47:caff:fe78:8708] (helo=fangorn) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1wp7k4-000000005sM-1pp0; Wed, 29 Jul 2026 13:06:52 -0400 Date: Wed, 29 Jul 2026 13:06:46 -0400 From: Rik van Riel To: Thomas Gleixner Cc: Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, Nikunj A Dadhania , Babu Moger , kernel-team@meta.com Subject: [PATCH] x86/cpufeatures: make clearcpuid=invlpgb work Message-ID: <20260729130646.304ad69d@fangorn> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.49; x86_64-redhat-linux-gnu) 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-Transfer-Encoding: 7bit With the recently found INVLPGB / TLBSYNC issue, there has been some interest in disabling invlpgb TLB flushing, in order to rule out that issue wihle tracking down some userspace crash. The top search result shows "clearcpuid=invlpgb" However, invlpgb is not actually in x86_cap_flags, so booting with clearcpuid=invlpgb results in the following message: clearcpuid: unknown CPU flag: invlpgb Adding "invlpgb" to the comment after X86_FEATURE_INVLPGB causes mkcapflags.sh to pick up invlpgb, and add it to x86_cap_flags. With that change, clearcpuid=invlpgb works: clearcpuid: force-disabling CPU feature flag: invlpgb Signed-off-by: Rik van Riel --- arch/x86/include/asm/cpufeatures.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 1b4a48bff18f..62fa2b0236af 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -332,7 +332,7 @@ #define X86_FEATURE_CLZERO (13*32+ 0) /* "clzero" CLZERO instruction */ #define X86_FEATURE_IRPERF (13*32+ 1) /* "irperf" Instructions Retired Count */ #define X86_FEATURE_XSAVEERPTR (13*32+ 2) /* "xsaveerptr" Always save/restore FP error pointers */ -#define X86_FEATURE_INVLPGB (13*32+ 3) /* INVLPGB and TLBSYNC instructions supported */ +#define X86_FEATURE_INVLPGB (13*32+ 3) /* "invplgb" INVLPGB and TLBSYNC instructions supported */ #define X86_FEATURE_RDPRU (13*32+ 4) /* "rdpru" Read processor register at user level */ #define X86_FEATURE_WBNOINVD (13*32+ 9) /* "wbnoinvd" WBNOINVD instruction */ #define X86_FEATURE_AMD_IBPB (13*32+12) /* Indirect Branch Prediction Barrier */ -- 2.54.0