Message ID | 20210813150526.179743749@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A78A7C43214 for <stable@archiver.kernel.org>; Fri, 13 Aug 2021 15:12:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8943861106 for <stable@archiver.kernel.org>; Fri, 13 Aug 2021 15:12:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242175AbhHMPMx (ORCPT <rfc822;stable@archiver.kernel.org>); Fri, 13 Aug 2021 11:12:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:55830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241746AbhHMPLy (ORCPT <rfc822;stable@vger.kernel.org>); Fri, 13 Aug 2021 11:11:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4B0EA61106; Fri, 13 Aug 2021 15:11:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628867487; bh=AcwOAKtaaZ1PKJZVNCY9Xyp10LHNLHA3w8N76VEGJJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FWVt39NbfSISOG4pcCM8hWFucZa3o1uYAr1kMUQkLB4NaCleef8n48GAK8hdXuaRx ePq5//AUjHRDXqFG2+oJm2AaZCKlXN6G/pKU5PEBFi9YLRGsTw77SpwiE/o5TBDa+d SX5bm6ijpb1mY3yilXMlYvOd7Clv1wtdwQks411E= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Like Xu <likexu@tencent.com>, "Peter Zijlstra (Intel)" <peterz@infradead.org>, Liam Merwick <liam.merwick@oracle.com>, Kim Phillips <kim.phillips@amd.com> Subject: [PATCH 4.14 32/42] perf/x86/amd: Dont touch the AMD64_EVENTSEL_HOSTONLY bit inside the guest Date: Fri, 13 Aug 2021 17:06:58 +0200 Message-Id: <20210813150526.179743749@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210813150525.098817398@linuxfoundation.org> References: <20210813150525.098817398@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/arch/x86/events/perf_event.h +++ b/arch/x86/events/perf_event.h @@ -792,9 +792,10 @@ void x86_pmu_stop(struct perf_event *eve static inline void x86_pmu_disable_event(struct perf_event *event) { + u64 disable_mask = __this_cpu_read(cpu_hw_events.perf_ctr_virt_mask); struct hw_perf_event *hwc = &event->hw; - wrmsrl(hwc->config_base, hwc->config); + wrmsrl(hwc->config_base, hwc->config & ~disable_mask); } void x86_pmu_enable_event(struct perf_event *event);