Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 C260E403B1B; Wed, 30 Sep 2026 19:35:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790796933; cv=none; b=X1kxRHqLYml71Oyz8MXAq6mrT3MVxjegpSL3dMZZ6go1EB5xL6qqZWkkKOXW1YexNn8mSmIvTLI2NRCSXbgzhCahgJqYxfNQML7udadwPgp4aN5DN/Wot32mUx3VQt2+j+6NiKGTuHnCbeJl/nTU4BNz7M8MH+6srxoFuV2H7cc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790796933; c=relaxed/simple; bh=2A+6lh9tzd+nL5WRbi2xC7/bS0Ai1hMW9FMS52m7new=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BSTxzNpRZYHwUBWxylDca+LPRMn2SVOS1WVRNjHMxwtMVOQwLI+I+qQ+fTqiWp8JLgSfrDczTsvlRg11Dw48plr3zBHhs2lURjR6pfhb+IMeM/ibFwtUcqFdTEDetDh+C1w4nyfELZs6YQlzGHRRDbAHomr67SE1aypAnG/n2dg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Pgw1fRxm; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Pgw1fRxm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FACD1F000FF; Wed, 30 Sep 2026 19:35:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790796932; bh=4FTkGmGnDSPyFyvA400Lzxs4CfAons3OZH/k0NlQT2E=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Pgw1fRxm+9gChz/3uNIA11DIVMsuaAymo5q9yneSkS+KPsWuxUZShPU9FFEylYeNz PthBphlhtdWQxNk2FtxenulcC/Um5SYCdMkRxoBd54nf7Uozd/GrI4xZzYsSuyHV7K KeAz+xpN+PUOIPjqp1Quf0VJjvlY03JdzZ5Fh0Jg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sean Christopherson , "Peter Zijlstra (Intel)" , Ingo Molnar , Jim Mattson , Dapeng Mi , Sasha Levin Subject: [PATCH 6.6 1086/1193] perf/x86/intel: Make @data a mandatory param for intel_guest_get_msrs() Date: Wed, 30 Sep 2026 17:29:30 +0200 Message-ID: <20260930152458.361061657@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152434.301151190@linuxfoundation.org> References: <20260930152434.301151190@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sean Christopherson [ Upstream commit a391618e1d563f099e4c2a704f45d08329ccdf7c ] Drop "support" for passing a NULL @data/@kvm_pmu param when getting guest MSRs. KVM, the only in-tree user, unconditionally passes a non-NULL pointer, and carrying code that suggests @data may be NULL is confusing, e.g. incorrectly implies that there are scenarios where KVM doesn't pass a PMU context. Fixes: 8183a538cd95 ("KVM: x86/pmu: Add IA32_DS_AREA MSR emulation to support guest DS") Signed-off-by: Sean Christopherson Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Jim Mattson Reviewed-by: Dapeng Mi Link: https://patch.msgid.link/20260921191418.950933-5-seanjc@google.com Signed-off-by: Sasha Levin --- arch/x86/events/intel/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 98f92c366cb57..db5ad012dd40a 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -4191,11 +4191,11 @@ static struct perf_guest_switch_msr *intel_guest_get_msrs(int *nr, void *data) } /* - * If the guest won't use PEBS or the CPU doesn't support PEBS in the - * guest, then there's nothing more to do as disabling PMCs via - * PERF_GLOBAL_CTRL is sufficient on CPUs with guest/host isolation. + * If the CPU doesn't support PEBS in the guest, then there's nothing + * more to do as disabling PMCs via PERF_GLOBAL_CTRL is sufficient on + * CPUs with guest/host isolation. */ - if (!kvm_pmu || !x86_pmu.pebs_ept) + if (!x86_pmu.pebs_ept) return arr; /* -- 2.53.0