Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6904277rdb; Tue, 2 Jan 2024 19:11:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFra9AqTvBG1Z1V2hxYU0EC31VV9XKmAuyKZtnzCOALk48f59TnyIWLgA7ESzpkXadq2myL X-Received: by 2002:a05:6808:22a0:b0:3bc:258a:a207 with SMTP id bo32-20020a05680822a000b003bc258aa207mr410353oib.61.1704251503377; Tue, 02 Jan 2024 19:11:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704251503; cv=none; d=google.com; s=arc-20160816; b=WXw7XEMM1g2bulZwOZgytyPb6vSUv8V2TktmEhxkP0Dhxf2mKfEmIU02uYI7DKuPok p1epvJCIUE3PXZNggQhbF7jVpGCqywWUxNBwUJ70B3fnuLCQJNFgVs7ZJ09v1CLiWeMk Jwj5jIeTBrAHe4WEtTbc/bGB5ZaJkrnOt9cZpxv/kbs7N1ShgW6Tjy+xf3ydNzUBCTF0 Exrsff/RcpzkLF32eRiNBcpR1hfLnOnqD2ISFz/10PE74Gc+aZjQ6G61FgVMP4inqVQ4 l0tbLBVxTUMhyyW4DlXw64UJfxSqoCjZijJIP9nrEYZSPevr8EPw4XcEYjNPE6pK5AKu O60A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=R6VGL9A3SNqHbRYK2sTOkKHSSjJk4/YlVjOGXiTFjPw=; fh=YsfTl7qN5yLiZ/GhYjuBdDgWBv8FNcMbD5266uBeHkY=; b=0yuWZELdK8jhbLkIappmzaY6EJvnZIIC9o7CMjpphVx8pxQP0Wh5f1KqtMxRFQx9En IvslPIPhUMTpMk6hwLNmChf0DcxbKx/K+OeJ52agXZ2pEbHc1yJVzcRCK67YpVhaJtAy VfFOO6QOgRGmQwyEe+yciudwLENFUCmT8qMcwgZKKVmHSO0O8QcJejTmclZEfIADoISy hT1Ts5Ynb/YCAMEpsWxBswWVpj8GryrjTlIryEzZ0ApqTzl/6MYYlDmSmvYKa4qOpo6Z ekkrEnfBIEJf+9jAk69WJ6mpDWAFB6ROJUvJ8Exa3SPi67rHVX9sj6WoGaMXvANpbKsK n0ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="D5/T5KqO"; spf=pass (google.com: domain of linux-kernel+bounces-15120-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15120-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bw15-20020a056a00408f00b006d9bcb822dasi14725025pfb.306.2024.01.02.19.11.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 19:11:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15120-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="D5/T5KqO"; spf=pass (google.com: domain of linux-kernel+bounces-15120-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15120-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 985DC283D9F for ; Wed, 3 Jan 2024 03:11:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4655818C28; Wed, 3 Jan 2024 03:09:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="D5/T5KqO" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 38A0818B19; Wed, 3 Jan 2024 03:09:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704251388; x=1735787388; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=F3O1AGqo4cde/C+vvkiVvkwpaA4RYdhbUZBoJXM9NzA=; b=D5/T5KqO74nRN2APVdosF+a9fmAEVPzKg/rc49utwVITDt8uC22eFCeI FCH0NnYgYDE1ojSYOzoQTUfGfsgbqGp03HsLiPsh0/VmhHLKOLfNsw1s8 B94nZqRwNZjkXxnddxTbDLwre2Rja2MSBb7zTOW3ux/v4scOHPrVQDa6i 8eD9ZE3mKnke7iPpsP9SsB/c8u7mfAI90Fsk9eUjrn2vuknZQETs4/9t1 GtI04F40G7RlrQ6y1pZbXaqahefGxWjXw+ZT0wyRb7z8jgnA7WoWUGbX9 WJdz92Spb61bFQwkUaZrW/60zS8YIhgxoj8h3qmSi+MJQILFL6fDYt096 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10941"; a="10343143" X-IronPort-AV: E=Sophos;i="6.04,326,1695711600"; d="scan'208";a="10343143" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jan 2024 19:09:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10941"; a="729665941" X-IronPort-AV: E=Sophos;i="6.04,326,1695711600"; d="scan'208";a="729665941" Received: from dmi-pnp-i7.sh.intel.com ([10.239.159.155]) by orsmga003.jf.intel.com with ESMTP; 02 Jan 2024 19:09:44 -0800 From: Dapeng Mi To: Sean Christopherson , Paolo Bonzini , Jim Mattson Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Zhenyu Wang , Zhang Xiong , Mingwei Zhang , Like Xu , Jinrong Liang , Dapeng Mi , Dapeng Mi Subject: [kvm-unit-tests Patch v3 05/11] x86: pmu: Refine fixed_events[] names Date: Wed, 3 Jan 2024 11:14:03 +0800 Message-Id: <20240103031409.2504051-6-dapeng1.mi@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240103031409.2504051-1-dapeng1.mi@linux.intel.com> References: <20240103031409.2504051-1-dapeng1.mi@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In SDM the fixed counter is numbered from 0 but currently the fixed_events names are numbered from 1. It would cause confusion for users. So Change the fixed_events[] names to number from 0 as well and keep identical with SDM. Signed-off-by: Dapeng Mi --- x86/pmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x86/pmu.c b/x86/pmu.c index 67ebfbe55b49..a2c64a1ce95b 100644 --- a/x86/pmu.c +++ b/x86/pmu.c @@ -44,9 +44,9 @@ struct pmu_event { {"branches", 0x00c2, 1*N, 1.1*N}, {"branch misses", 0x00c3, 0, 0.1*N}, }, fixed_events[] = { - {"fixed 1", MSR_CORE_PERF_FIXED_CTR0, 10*N, 10.2*N}, - {"fixed 2", MSR_CORE_PERF_FIXED_CTR0 + 1, 1*N, 30*N}, - {"fixed 3", MSR_CORE_PERF_FIXED_CTR0 + 2, 0.1*N, 30*N} + {"fixed 0", MSR_CORE_PERF_FIXED_CTR0, 10*N, 10.2*N}, + {"fixed 1", MSR_CORE_PERF_FIXED_CTR0 + 1, 1*N, 30*N}, + {"fixed 2", MSR_CORE_PERF_FIXED_CTR0 + 2, 0.1*N, 30*N} }; char *buf; -- 2.34.1