From mboxrd@z Thu Jan 1 00:00:00 1970 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 7885D1E0DD8; Wed, 30 Sep 2026 16:57:22 +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=1790787443; cv=none; b=iLhCD5UVezBjh7DLH4qs/RGbVG9I6kAZnP/wAW6TUzXSsoexWf4DJIS1oZMeLn1lyQAkOaH48E2Qug5erir4p+jkqQG/497pz2j1NetCP4lbouP1alIiMRVsOqYcUBi46uBbzbIj/GIO9ev+HeT+m96dHUxgTWrbx6x120jIXg4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790787443; c=relaxed/simple; bh=x9PowRZe79OpdSYxmcPbi57Nbm/b0Wc5K1fz1wwnJLY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z8mGkkhlQD1K3I50wPtNtOSwOBjsYnUUiksfN/NjZgkyH5U2+1dPovY1rM7OiZOIfSaySzH0U4/Vos0yb5iGbXSLoug+vYy7YcZvF3dtirSf9Stgz00XrGSNr/dLQMGc48n7r1FaWIX4Rw5vyK4i4MiZ3WNEDJTc4oU2a1E+04o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LMMO2D9G; 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="LMMO2D9G" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1DF51F000FF; Wed, 30 Sep 2026 16:57:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790787442; bh=GOFK5XpsLl4Cy8Qf06oivhYsTWLfabX481Mone52hJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LMMO2D9G4C750rOpqjO0ec+f4V0iHiPlIo7p4YtQ2hxtoiKy9tnvet++TPpG7khqb GtWrlet1ml/W+qE7UDJyIVySn7VqmrbMOxpWnJ4gkjA4f4IP4Rsz/6Y+sy5c2f8Ao+ 9E6Y8iSZAo2JhKXWP07bc3uDggs/3HzMRjbjrMQo= 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 7.2 231/457] perf/x86/intel: Make @data a mandatory param for intel_guest_get_msrs() Date: Wed, 30 Sep 2026 17:25:36 +0200 Message-ID: <20260930152351.031653913@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152346.024115587@linuxfoundation.org> References: <20260930152346.024115587@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 7.2-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 b9d7fdf6c6585..41134233fc512 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -5333,11 +5333,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