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 7B4802222D0; Wed, 30 Sep 2026 18:34:45 +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=1790793286; cv=none; b=omusYWVa7N6YSSs9y/cKjBSFiEGrb69+/wBc8r+1iNSlqkdsENA98x/Xobz04VIocrxal5rRLcBIbD3SeZTq8qKnYNF/HnKRgVCcck28NynSMICziLLlQx1BTzGpsyI2f8TSptbyf/QjOFJs73y9Ya3XG6zyYev24rX9ijG4Bzs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790793286; c=relaxed/simple; bh=6pQWR3QmmOaT3oBKfat2LUu9tDZwov7OAXtREech7Is=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Pno0lZPVP67BHqsxXnjDRwN+K98QXdtpwuEPX5g5lLpmCVuTF6ckCTfHZUGlKQGs0RTPYpHHPcM3nnN3XCK6lfOMUNZ5WVbU/eEiVf5ufQ7rQ0/Au/pNZ6roPZ9KmNfdI6kmvqjD1PFYC11jr55t4OP+p3p7YOUQw9rGECu0cpc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1p2Mo3GU; 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="1p2Mo3GU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB3EC1F000FF; Wed, 30 Sep 2026 18:34:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790793285; bh=FFTuTYt3a+McwHBDW7NcCBmHjBCNn2sVdrtj1c5eFrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1p2Mo3GUSVRS5RMiM1VuOC4f3KLx4GBLVaqquDNVPrPGnyoRU4hdEWeR1lAVWf2hs P7uj8I0lPbAmYUNm+XiJHTT5PWotg4KgPmM7Aphi3nHuAC6hgTxlNCipw4JJLGL3W1 pxVTtGdIY1EKklmDHMaCaMFXllFEprX+0HKX+zZ8= 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.18 200/395] perf/x86/intel: Make @data a mandatory param for intel_guest_get_msrs() Date: Wed, 30 Sep 2026 17:27:42 +0200 Message-ID: <20260930152344.987814200@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152340.591469096@linuxfoundation.org> References: <20260930152340.591469096@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.18-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 ae09839ae2fcb..03bb3a1670e65 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -4666,11 +4666,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