Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2710136pxf; Sun, 14 Mar 2021 09:04:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyt7HaXrm0ttk5SlJ+DWHvm0vW6aZB6GIYQKa6fX6cn8ho45EJrdjGSkA+J5wvA3TS3m634 X-Received: by 2002:aa7:d484:: with SMTP id b4mr25531878edr.63.1615737850890; Sun, 14 Mar 2021 09:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615737850; cv=none; d=google.com; s=arc-20160816; b=j8YLKkdp0DjzyiOhnluBRmIwlQog16/9HBakBQSUQBL7xKU1i4zF04CI99/et6vojL 8+Is5/G36efbuZpqe0Tnh/ApXGn5SWuwXUc/TYHDBJ9eWiekuRgEzvOK9o976gbucbzu 9IC8HNBeurTcn9yGUIX9Zq++GIIzqVptGd760fcHTK8Xq/TOIYx23ViQTEMUwjCESADU daWLv6mtLNbNlGcmZDkPjOdu8jdhs8xm4hamxg71Kmao5WB0owhIFArHYWI0+w9OGuIQ o3LTqbqXUfisGPqqEjA/bYKQsw8VML7eD6/wczyw1c6HZZ9A1LsrH1n4jpiUljZCvkDN OW/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=uoA3YPU0VtzGO7DRgjvdU9BIazcxUk4RHZpgvSnDryE=; b=ZAgVmNrs4W8fbemnzE7U6Q3WvLNQ2CG+eT3CqNibGjoi3Jo2Dv9rpz3Z+9/0kjtugI fx3SzpTLLf12SugGEQJu9ymExSIHp/TE1RXkLsh+OOqjxZhTuUYemTxKSbBxENBrcW73 URvxtuXiLTDsqiqIFx5ysAnbdw3svNokyJhiaaakfEzUIXuqFJjmPv1ABAoq65evcPwC 0tXj2JP+2tsl7hR8jIWGn8+b4wiflEGaWw1QpC9+MSI2SdwP3UucseOTapmytIpsXEgl 9zNbXbGJDGLTxCznAkerTM2tkHCmFR/8PqnH2cW42ewuBt1sU4HxGZ1uF6MVQHhA5JH0 bSfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e21si8613619edr.370.2021.03.14.09.03.48; Sun, 14 Mar 2021 09:04:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234490AbhCNQBZ (ORCPT + 99 others); Sun, 14 Mar 2021 12:01:25 -0400 Received: from mga14.intel.com ([192.55.52.115]:7167 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234084AbhCNQAl (ORCPT ); Sun, 14 Mar 2021 12:00:41 -0400 IronPort-SDR: 5eify48Z8X5OF3prqzd2r/VHWY5NZ6JFje9ZpSLxjBLqj1olQiRy3eoztMF9YOgNHbJcbMdX4T ApHl1RMP8U9A== X-IronPort-AV: E=McAfee;i="6000,8403,9923"; a="188360710" X-IronPort-AV: E=Sophos;i="5.81,248,1610438400"; d="scan'208";a="188360710" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2021 09:00:41 -0700 IronPort-SDR: /yMyRBRGR4Vpgh6BZ9zovdu5j0jz2bgr6jVwT9pKHuA999m+vvxSXxV6LW/KaK8xJAJq/w4VIW h+YRFCvoT4mA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,248,1610438400"; d="scan'208";a="439530667" Received: from clx-ap-likexu.sh.intel.com ([10.239.48.108]) by FMSMGA003.fm.intel.com with ESMTP; 14 Mar 2021 09:00:38 -0700 From: Like Xu To: Paolo Bonzini , Sean Christopherson Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, x86@kernel.org, wei.w.wang@intel.com, linux-kernel@vger.kernel.org, Like Xu , Kan Liang , Peter Zijlstra , Borislav Petkov , Ingo Molnar Subject: [PATCH v4 05/11] perf/x86: Move ARCH_LBR_CTL_MASK definition to include/asm/msr-index.h Date: Sun, 14 Mar 2021 23:52:18 +0800 Message-Id: <20210314155225.206661-6-like.xu@linux.intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210314155225.206661-1-like.xu@linux.intel.com> References: <20210314155225.206661-1-like.xu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ARCH_LBR_CTL_MASK will be reused for LBR emulation in the KVM. Cc: Kan Liang Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Ingo Molnar Signed-off-by: Like Xu --- arch/x86/events/intel/lbr.c | 2 -- arch/x86/include/asm/msr-index.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/events/intel/lbr.c b/arch/x86/events/intel/lbr.c index 237876733e12..f60339ff0c13 100644 --- a/arch/x86/events/intel/lbr.c +++ b/arch/x86/events/intel/lbr.c @@ -168,8 +168,6 @@ enum { ARCH_LBR_RETURN |\ ARCH_LBR_OTHER_BRANCH) -#define ARCH_LBR_CTL_MASK 0x7f000e - static void intel_pmu_lbr_filter(struct cpu_hw_events *cpuc); static __always_inline bool is_lbr_call_stack_bit_set(u64 config) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index 546d6ecf0a35..8f3375961efc 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -169,6 +169,7 @@ #define LBR_INFO_BR_TYPE (0xfull << LBR_INFO_BR_TYPE_OFFSET) #define MSR_ARCH_LBR_CTL 0x000014ce +#define ARCH_LBR_CTL_MASK 0x7f000e #define ARCH_LBR_CTL_LBREN BIT(0) #define ARCH_LBR_CTL_CPL_OFFSET 1 #define ARCH_LBR_CTL_CPL (0x3ull << ARCH_LBR_CTL_CPL_OFFSET) -- 2.29.2