From nobody Sun Jun 14 15:55:30 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 37C2D386C25; Fri, 3 Apr 2026 12:30:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775219411; cv=none; b=QAa/S1J2y7QtHFcMu+GoSQ0GKTj/DJfvfOmIRtIZ8kqtYq4w9nueFHQdI6dKXSojlCHzpSMCARmhEpFZZnKu/9bysysQwgwMGXBY5+nG5HD2gHbIdcqZGJpVS4mrrHEPIekTtIaSy+FDvd6n7VNVOc/x4Z5sGhWdJ/jrlKPfnng= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775219411; c=relaxed/simple; bh=Nz4U0a4PUhrlhbdTP34jBGrgt0aNBWXJ97Ib6gyatUY=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=sg19Tyyn0uKdo7FHOprAX7hRup8HnQMJUUei9zGOuEvFdGDlLZbx7e/w/A21rl2cu7Ew7f58B8wSYzA3MQPLTzceDo9diRTps7qUTZ/9LWuiM4z9GXPL3bmFqYn+5UYjJM8ItW+qBVr4qF+GhrEvgInk5PShUYuq3IInzrP7dZs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=CjESAStT; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yG+Iafgr; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CjESAStT"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yG+Iafgr" Date: Fri, 03 Apr 2026 12:29:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1775219401; 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=redAn5eWou4FsfYqseUlRaA9p01hqU1YXSZjTxoB6Ak=; b=CjESAStTS+pZIuzWaQhJkZUBYPneSodqxawyba7jaFV7Tm5UhXy7qYSiWbIdISn+X4c8wx OdPhipkjBdwpYyTZUBiyrG6bdta++sSkYuPhC4y/fcRGOn01MYfXWbooPPVZCXYOfoHxlc Rls8FDX1ycRHuzhWtAtoNUlrIJZ9J8BN/1Vq4g1JmcJvuGUmoleQsx+JyChaHK1iXTx/5k CdM4urtZFOhNEfqvO+aZb1UAKpJC+wRvdvM0iKPlLspoSH4/O0qTqOYSV8LdvLv9uYpSgf BRpyjTxYBorfKdVj/xrUa/QhNpauMQ8eRNuik4QKLd82Idtnz6hRwf9HNwv4+A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1775219401; 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=redAn5eWou4FsfYqseUlRaA9p01hqU1YXSZjTxoB6Ak=; b=yG+IafgrozPHR+Daa/hzmlN9Q9tS5ofJwjfSEmr0JYN002AY7y1vIAgVMSYDRlCEK59xaL Pt3g+Yde7dYlpsCA== From: "tip-bot2 for Kan Liang" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf/x86/msr: Make SMI and PPERF on by default Cc: Kan Liang , Dapeng Mi , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260327052844.818218-1-dapeng1.mi@linux.intel.com> References: <20260327052844.818218-1-dapeng1.mi@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177521939639.1647592.6630193298101023153.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the perf/core branch of tip: Commit-ID: 9805ed3c91478b08a586861b874bd8b6a2fed648 Gitweb: https://git.kernel.org/tip/9805ed3c91478b08a586861b874bd8b6a= 2fed648 Author: Kan Liang AuthorDate: Fri, 27 Mar 2026 13:28:44 +08:00 Committer: Peter Zijlstra CommitterDate: Fri, 03 Apr 2026 14:23:43 +02:00 perf/x86/msr: Make SMI and PPERF on by default The MSRs, SMI_COUNT and PPERF, are model-specific MSRs. A very long CPU ID list is maintained to indicate the supported platforms. With more and more platforms being introduced, new CPU IDs have to be kept adding. Also, the old kernel has to be updated to apply the new CPU ID. The MSRs have been introduced for a long time. There is no plan to change them in the near future. Furthermore, the current code utilizes rdmsr_safe() to check the availability of MSRs before using it. Make them on by default. It should be good enough to only rely on the rdmsr_safe() to check their availability for both existing and future platforms. Signed-off-by: Kan Liang Co-developed-by: Dapeng Mi Signed-off-by: Dapeng Mi Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260327052844.818218-1-dapeng1.mi@linux.int= el.com --- arch/x86/events/msr.c | 82 +----------------------------------------- 1 file changed, 3 insertions(+), 79 deletions(-) diff --git a/arch/x86/events/msr.c b/arch/x86/events/msr.c index 8052596..76d6418 100644 --- a/arch/x86/events/msr.c +++ b/arch/x86/events/msr.c @@ -2,7 +2,6 @@ #include #include #include -#include #include =20 #include "probe.h" @@ -41,86 +40,11 @@ static bool test_therm_status(int idx, void *data) =20 static bool test_intel(int idx, void *data) { - if (boot_cpu_data.x86_vendor !=3D X86_VENDOR_INTEL || - boot_cpu_data.x86 !=3D 6) + if (boot_cpu_data.x86_vendor !=3D X86_VENDOR_INTEL) return false; =20 - switch (boot_cpu_data.x86_vfm) { - case INTEL_NEHALEM: - case INTEL_NEHALEM_G: - case INTEL_NEHALEM_EP: - case INTEL_NEHALEM_EX: - - case INTEL_WESTMERE: - case INTEL_WESTMERE_EP: - case INTEL_WESTMERE_EX: - - case INTEL_SANDYBRIDGE: - case INTEL_SANDYBRIDGE_X: - - case INTEL_IVYBRIDGE: - case INTEL_IVYBRIDGE_X: - - case INTEL_HASWELL: - case INTEL_HASWELL_X: - case INTEL_HASWELL_L: - case INTEL_HASWELL_G: - - case INTEL_BROADWELL: - case INTEL_BROADWELL_D: - case INTEL_BROADWELL_G: - case INTEL_BROADWELL_X: - case INTEL_SAPPHIRERAPIDS_X: - case INTEL_EMERALDRAPIDS_X: - case INTEL_GRANITERAPIDS_X: - case INTEL_GRANITERAPIDS_D: - - case INTEL_ATOM_SILVERMONT: - case INTEL_ATOM_SILVERMONT_D: - case INTEL_ATOM_AIRMONT: - case INTEL_ATOM_AIRMONT_NP: - - case INTEL_ATOM_GOLDMONT: - case INTEL_ATOM_GOLDMONT_D: - case INTEL_ATOM_GOLDMONT_PLUS: - case INTEL_ATOM_TREMONT_D: - case INTEL_ATOM_TREMONT: - case INTEL_ATOM_TREMONT_L: - - case INTEL_XEON_PHI_KNL: - case INTEL_XEON_PHI_KNM: - if (idx =3D=3D PERF_MSR_SMI) - return true; - break; - - case INTEL_SKYLAKE_L: - case INTEL_SKYLAKE: - case INTEL_SKYLAKE_X: - case INTEL_KABYLAKE_L: - case INTEL_KABYLAKE: - case INTEL_COMETLAKE_L: - case INTEL_COMETLAKE: - case INTEL_ICELAKE_L: - case INTEL_ICELAKE: - case INTEL_ICELAKE_X: - case INTEL_ICELAKE_D: - case INTEL_TIGERLAKE_L: - case INTEL_TIGERLAKE: - case INTEL_ROCKETLAKE: - case INTEL_ALDERLAKE: - case INTEL_ALDERLAKE_L: - case INTEL_ATOM_GRACEMONT: - case INTEL_RAPTORLAKE: - case INTEL_RAPTORLAKE_P: - case INTEL_RAPTORLAKE_S: - case INTEL_METEORLAKE: - case INTEL_METEORLAKE_L: - if (idx =3D=3D PERF_MSR_SMI || idx =3D=3D PERF_MSR_PPERF) - return true; - break; - } - - return false; + /* Rely on perf_msr_probe() to check the availability */ + return true; } =20 PMU_EVENT_ATTR_STRING(tsc, attr_tsc, "event=3D0x00" );