Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp115000rdb; Tue, 31 Oct 2023 02:22:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IET++AvkUjPSE1INZvTPZyVsYL8JPZVcwI9lkKVIvRQFNGZWQj0xAwVOkLQHxrTNX8g4Rdr X-Received: by 2002:aca:1c03:0:b0:3a7:1e86:e83f with SMTP id c3-20020aca1c03000000b003a71e86e83fmr13278800oic.51.1698744149986; Tue, 31 Oct 2023 02:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698744149; cv=none; d=google.com; s=arc-20160816; b=LxjXHk6i5dgK+LU0a9D+Oz/6VItH1vXvU/9/rXdNEMTZkX0u6RsHGu6fuvyvdgoFNO IHovukjOtCXUe3zDKBQWWiVTcEE6LzN7m5dmXJPZjzKE/omjT3VOqDTA1QYL+LUC5pOC zNotZfy6kFjyAZbTdor4F31GXYejzGcMUWWPOMXjmgR6HC9b5YFGp6I7BKbxj1S6nW6H SC8AzZr8k9ENGvWD5YB2dMAVduRlavIn0520P7VX7tF6asN91olAeZd+mHK82hyu6tYn NOTye0i3KgIY0MHuc3qWbZL0SQrIUt1s05ee+AboY+IsoJsqQd8D2xXtgZAVxuF7Yuez q4jQ== 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 :dkim-signature; bh=h+p8MypFEn87KtzkX8EEd2/54TFm0UDegN17PnjoJ30=; fh=E3ilibYCxplRFz20OpOkjMj1lMKBPGRzcx1abGX98y8=; b=pMnxFm/bItmPyQLEEFXVOsctdCyIgL/Yj3JISo5yC4fMA9hLyBGyjMZ47SmpZqorJj zFeKsCrsd4qakD1yvm8gah0wPiMWX/C5xY1z3QdDHt5qg3Wkt1Tkl0G4CH66T3yJoPWG XcuSMHtHDnFUkgzAPRCatc/mmmzeI8Ho2n+ktsziBWFfJjvayMEfa/22Q99j4cI3IFGU 63fUAjtUS5nFEwOn1m7AvmXN2lH/uslTq2gDA8dJX0iWnI4OZ5uIpKOFAKRIHGT4f2nl UqIqTT1o+bitbHZGMA9o/+KqYeYUXlnNBhb+bf/GFjTwgxoKGc2No6SeNkHeQH0t8lc5 iG7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ng6mG7EJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id z20-20020aa78894000000b006b6efb7f99fsi741936pfe.280.2023.10.31.02.22.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 02:22:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ng6mG7EJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 7C38A8035124; Tue, 31 Oct 2023 02:22:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343860AbjJaJWF (ORCPT + 99 others); Tue, 31 Oct 2023 05:22:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343877AbjJaJWC (ORCPT ); Tue, 31 Oct 2023 05:22:02 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D77E110; Tue, 31 Oct 2023 02:21:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698744119; x=1730280119; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hGJvfX2hIKMvWkOHT5amNhhbAWNGgZop9FcOLKuXuaA=; b=Ng6mG7EJ4znXJ+IDS1nfquItUA+grbWRFMielJRLsPj/K6+x8rm9Ztw2 rVvi50cEyUfdVcEtkLmuBBfzg/eoXZvZl+9DZlrKKU/JpwPar892mWq3U B4Rmh4AN2B1FA1xhSAqqqM3kmcacUmNCSymaIDoFx7ZG28S9gV/csx60d 4sx9Ro62HOJY7kRXBGLtrMg4uI2hO9cFMmGTC51DXf7CqIl9qPDyo9/po I1EXWRMCoK/huf1HnABjbvw+Ke7kakRBqee9IKth9vaBjXYp5UIJTWgo3 ZOsVdRl4V5ZE042yd67F5C3FW1BE9FuzKb1NhBB1wgG7pvgRyO+BleGF8 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10879"; a="385435983" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="385435983" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2023 02:21:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10879"; a="877445531" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="877445531" Received: from dmi-pnp-i7.sh.intel.com ([10.239.159.155]) by fmsmga002.fm.intel.com with ESMTP; 31 Oct 2023 02:21:55 -0700 From: Dapeng Mi To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Zhenyu Wang , Zhang Xiong , Jim Mattson , Mingwei Zhang , Like Xu , Dapeng Mi , Dapeng Mi Subject: [kvm-unit-tests Patch v2 4/5] x86: pmu: Support validation for Intel PMU fixed counter 3 Date: Tue, 31 Oct 2023 17:29:20 +0800 Message-Id: <20231031092921.2885109-5-dapeng1.mi@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231031092921.2885109-1-dapeng1.mi@linux.intel.com> References: <20231031092921.2885109-1-dapeng1.mi@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 31 Oct 2023 02:22:27 -0700 (PDT) Intel CPUs, like Sapphire Rapids, introduces a new fixed counter (fixed counter 3) to counter/sample topdown.slots event, but current code still doesn't cover this new fixed counter. So this patch adds code to validate this new fixed counter can count slots event correctly. Signed-off-by: Dapeng Mi --- x86/pmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/x86/pmu.c b/x86/pmu.c index 6bd8f6d53f55..404dc7b62ac2 100644 --- a/x86/pmu.c +++ b/x86/pmu.c @@ -47,6 +47,7 @@ struct pmu_event { {"fixed 1", MSR_CORE_PERF_FIXED_CTR0, 10*N, 10.2*N}, {"fixed 2", MSR_CORE_PERF_FIXED_CTR0 + 1, 1*N, 500*N}, {"fixed 3", MSR_CORE_PERF_FIXED_CTR0 + 2, 0.1*N, 300*N}, + {"fixed 4", MSR_CORE_PERF_FIXED_CTR0 + 3, 1*N, 5000*N}, }; char *buf; -- 2.34.1