Message ID | 20210813150523.150423972@linuxfoundation.org |
---|---|
State | Superseded |
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 6D396C4338F for <stable@archiver.kernel.org>; Fri, 13 Aug 2021 15:10:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51AA061151 for <stable@archiver.kernel.org>; Fri, 13 Aug 2021 15:10:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241323AbhHMPKc (ORCPT <rfc822;stable@archiver.kernel.org>); Fri, 13 Aug 2021 11:10:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:53344 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241573AbhHMPKJ (ORCPT <rfc822;stable@vger.kernel.org>); Fri, 13 Aug 2021 11:10:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7DE30610A5; Fri, 13 Aug 2021 15:09:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628867383; bh=e+YRVIdHzRFLaCX0tRqJ4nxfDt8VW/X3YHwVokcTYrk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2DBWfR2kX//nhi6VellI83EsuaxFXuqC+EVB7s9EvGxWg8VDhDdWQxVYMLgqcD5Wm vUV7vFyY6HHcCSb2SZ369tRZzhluIOl996JQwkKQ+RC2G0x0QblLc3IFtK8TuOSmkW oZu3VWDjGNymlGFJsqfu6EaX1dOZU9sUs1J4pz2E= 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.9 22/30] perf/x86/amd: Dont touch the AMD64_EVENTSEL_HOSTONLY bit inside the guest Date: Fri, 13 Aug 2021 17:06:50 +0200 Message-Id: <20210813150523.150423972@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210813150522.445553924@linuxfoundation.org> References: <20210813150522.445553924@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 @@ -771,9 +771,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);