Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3189831pxf; Sun, 21 Mar 2021 23:15:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz75Ov8bqxlC5575NonY6wfNGu/hIDmNTkiH8QXcoi6ZkbY3CwMzAdrjQ3dmC0IIzq+uAmV X-Received: by 2002:a17:906:ad85:: with SMTP id la5mr17501737ejb.37.1616393752157; Sun, 21 Mar 2021 23:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616393752; cv=none; d=google.com; s=arc-20160816; b=VF5s5JUea61ptmupEbcigfhMreTvz4NZ839Aj8GYcLEkL6dyupx468eqn+9UTXSgfE mblnDuJ7M14u89v6aVMveU/bI0wTgMtr+E/mUCynNUjlT/6R3SYR3dgVnrizD4HE9MQr mnZ7ynJCVr5fsdjJcwA7711JncFl/gzhiAvpG9qawsrF1hl200CDOfJs+2nLpVJQgT1h qCTTiuVwkf43vjcBOIwgEerY4p+j3KGV8CY1OCApTlXRnSI0m1iwB7gwicrI0QunkCEJ gMOFMAgUH5XXdp0NxbJGCTo2YLAVV+A62H3Zmb0vdzWOOsF1+0Pt4LR1T/ywjcMe3XxO JtkA== 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=um2LcjdlOcoj/NRrZfQb864vV4r/HbKUZnCGg3VVXO4=; b=H2UxtIOVc+xMHmOMMsck+X0/cQxsa1e5oof6CuozrfTyfWpZrCc00YRQ5TbmxuNKbT 9no/rC7tAwgwzLg1IVtuhvnvFvu+Qf+JnysQNfJ4rPb0hdM8Ke8Av2Ia5uHrDLOBbL/e GaPT88xcniuxgHmAHFREidXEZXPo/g6hP8qheAA8w7P4x69G5AYDjlUYnfyBqPV5xmjN o88cHaIyXQTA7mNoQOgsQ1dFDqmqn3zL/q3lhX2XMDu+rbJ/skhj415fA2l9YgsdR2MU LKKh5GZiPQvNc6UXrmKXP1hluNMhWMX54fmcZtSJL7SuIu34Idm6gsJzmxCkjB6OZJeg mvfA== 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 r11si10051449eja.563.2021.03.21.23.15.30; Sun, 21 Mar 2021 23:15:52 -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 S229995AbhCVGOy (ORCPT + 99 others); Mon, 22 Mar 2021 02:14:54 -0400 Received: from mga11.intel.com ([192.55.52.93]:15223 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229875AbhCVGO3 (ORCPT ); Mon, 22 Mar 2021 02:14:29 -0400 IronPort-SDR: L1P8k28hTAipAaTB03MR6nQcSgM/T1NMfhQEYeUdnc5GJu4gThX1Ki1xPCtbI1Oapxh/xnDZgn ot/lI+JzEi8Q== X-IronPort-AV: E=McAfee;i="6000,8403,9930"; a="186889267" X-IronPort-AV: E=Sophos;i="5.81,268,1610438400"; d="scan'208";a="186889267" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2021 23:14:29 -0700 IronPort-SDR: IIEAJMd2jBboanPIXXpgVRZutGNTF/d+28KIjYkUC6ElpvMkbu8u0k6bu6vrnZix83fqzXZF9m VIVxcxfQEY7A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,268,1610438400"; d="scan'208";a="441026314" Received: from clx-ap-likexu.sh.intel.com ([10.239.48.108]) by fmsmga002.fm.intel.com with ESMTP; 21 Mar 2021 23:14:26 -0700 From: Like Xu To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Cc: Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Thomas Gleixner , Borislav Petkov , Kan Liang , x86@kernel.org, linux-kernel@vger.kernel.org, Like Xu Subject: [PATCH v4 RESEND 5/5] perf/x86: Move ARCH_LBR_CTL_MASK definition to include/asm/msr-index.h Date: Mon, 22 Mar 2021 14:06:35 +0800 Message-Id: <20210322060635.821531-6-like.xu@linux.intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210322060635.821531-1-like.xu@linux.intel.com> References: <20210322060635.821531-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 Arch LBR emulation in the KVM. 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