Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp517992lqt; Fri, 19 Apr 2024 02:46:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVKp68to1ctMGKXa69NSJnK/NJtX1Flpu9ICe7yvd7Bik20OAiihOjVpL8Nd8lnyVqGMDB9RnOevK/ozjIqHcPlqqW4meZcmpMiGJIqTQ== X-Google-Smtp-Source: AGHT+IGVfHahC+fEAgFLsogFnBH/v2y3FKttAjVbqXE2NiSxckvCSdYXmkkGnaSK3V679lArI5Wn X-Received: by 2002:a05:6a21:3a94:b0:1ac:3eb4:b924 with SMTP id zv20-20020a056a213a9400b001ac3eb4b924mr1415934pzb.4.1713519986256; Fri, 19 Apr 2024 02:46:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713519986; cv=pass; d=google.com; s=arc-20160816; b=0s5i6c1FXkioL0iuAq9NvF3QraXF4gY9YSPc06qDTK1rq4tesi9VoN+NQ4DycfH+Up ebplcVctUTU7x6dnJ8QA7nbH+WjZqzYqA905ODEub/5Y/XDKHXb9wRa7OJZXZsvJ2sMk CPcsQoAvuwSLGksDyNxRX8MMY1cm+Y2JJoHpSYTWEB5A6K//9nLaXxC56FUagChevkE6 o9VpAlBhL/EQQiDX8eAghZEy/usrN1907pjfjj6+d5CvSzRxIx+yNiM1dvXWr3qvId5q klVcIUJzfSbQJ2oNf0t7Gcrbe6f2FDTH05jCiYSCaxK0mfm5ou71hVOC6Wu1YxaAsMVs qPXA== ARC-Message-Signature: i=2; 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=/cVoV4OE2utYiuxzCo6HCy9bleHLcnZreWuX2o1fIWg=; fh=3qX1+dlN8PYECDPP2iJ6RyaKnRhI0MQxvVbehX3gfaw=; b=MY6JyhiJHaM2zDnb3lHvzsMUABrImEC2Bm7sqa+jzZQM6X0SmBjtIgOCsi91Xk082C Z2RFmMoYSjwyBuFqEViNsJm6P+D01LrH9rwYE66fC21uS9M3ApNLKXU+FPtjDCXXzOsZ xZH4DZ5upbl5C6twL26Of5j6fbi3b/nSf2zfXDTAPA4wzPqKTA8fzXhAb90/W0A5RVKz SznJ9CPhFlc1iv5AGJxeGRF8LK4lifMw253TfpIVd1gxy36KDusEARrlfiE9yeiajhc0 z//jxPXkYB51x6tOkOy6hsCGybxVLuYP/92gh3DkeYGioi+6FP2wQdcA0dGQU546bdki xxQw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PhLnN9fr; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-150979-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150979-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id fc15-20020a056a002e0f00b006ece0e619f5si3070597pfb.36.2024.04.19.02.46.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 02:46:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150979-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PhLnN9fr; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-150979-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150979-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 90B01B228A5 for ; Fri, 19 Apr 2024 03:46:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47CE4168D0; Fri, 19 Apr 2024 03:45:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PhLnN9fr" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 3875811713; Fri, 19 Apr 2024 03:45:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713498344; cv=none; b=QsWesnx0BDcNhZb5nU5l3KgXG1mJdfkiMco4WNqdznx1Pv+RcW992Zy22bPxLboJxKbUAJmQbZaNko56VZN9bANIN5MxNr58CDcwDltImCLc8FogZTV9gEaZWYSnzs7PVtj2gY98aS7/2ff9U3BnRDY8P2Pt6LfpPhlFvUvJd5E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713498344; c=relaxed/simple; bh=CEzCgDWBVKLE5GxE7FSPfrK8LT8jtbQYUwpmr+e1jXY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=teUIuGvfp45oK1BreYC8UiQd3Q+YVnLhEilcyID4Qg2mUmhhDKU4+5gK7yWiKiik2Zzng6xi0PW+KNM3qV4nD8xOSeXnfzm0eAz51q7X1PnvluVuEC275nnU8EZk0S4bajta7yVc+YPE5DvIoVZX8YWj7iFGANCbaNmMNjE/GmE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=PhLnN9fr; arc=none smtp.client-ip=198.175.65.9 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=1713498343; x=1745034343; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CEzCgDWBVKLE5GxE7FSPfrK8LT8jtbQYUwpmr+e1jXY=; b=PhLnN9fr4oeKM/1ufEkyR8C3cTkEAlLpZxNPD0evtb6NwEtmy4NBH7ce O5Ro3tV1Cd5eqwRwoRNczgLqft7PcCBPmXmXSrfSfmww3lg9LSpOdZ1/5 20/IK8y5kl+7jxDXCzvmPpfIuSqm99CciIoumYfQix0CT+7G1Nkw5w0eq bFpk4BxZTBVmkOqJSC1dh93y3ny7H7Dr1q0nz8USg00vW/jhrTdZBkkUW rQ7T6RTHNc73suCTjOnhlxU/V5hAowmJpFDUN+UeQysBpxrt063Cu/VLu ZDvNhaGiMWSJy4QbrazjNPdsc596xHnIsAoPYkNY7rQ+yl3Oy5QJwWfPg w==; X-CSE-ConnectionGUID: /0b2OimVTVqL9CdPCiQaiw== X-CSE-MsgGUID: W2Z0LTEyQEyuNydHbWiXjg== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="31565411" X-IronPort-AV: E=Sophos;i="6.07,213,1708416000"; d="scan'208";a="31565411" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 20:45:43 -0700 X-CSE-ConnectionGUID: hRWPN1lBS0ygcWzxNrhHLA== X-CSE-MsgGUID: c9gF6VFfSL+LfZbss1Zn5g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,213,1708416000"; d="scan'208";a="54410121" Received: from unknown (HELO dmi-pnp-i7.sh.intel.com) ([10.239.159.155]) by fmviesa001.fm.intel.com with ESMTP; 18 Apr 2024 20:45:40 -0700 From: Dapeng Mi To: Sean Christopherson , Paolo Bonzini , Jim Mattson , Mingwei Zhang Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Xiong Zhang , Zhenyu Wang , Like Xu , Jinrong Liang , Dapeng Mi , Dapeng Mi Subject: [kvm-unit-tests Patch v4 03/17] x86: pmu: Refine fixed_events[] names Date: Fri, 19 Apr 2024 11:52:19 +0800 Message-Id: <20240419035233.3837621-4-dapeng1.mi@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240419035233.3837621-1-dapeng1.mi@linux.intel.com> References: <20240419035233.3837621-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. Reviewed-by: Mingwei Zhang 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 4847a424f572..c971386db4e6 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