Message ID | 20231031092921.2885109-1-dapeng1.mi@linux.intel.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b90f:0:b0:403:3b70:6f57 with SMTP id t15csp108800vqg; Tue, 31 Oct 2023 02:22:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGdwc2Vq2j6vG6NBy7MAuLqobb+e+WfA7RMzowt7+RTNqTu8tuKXGDh7ibDr2bdk78XAKIs X-Received: by 2002:a05:6870:1394:b0:1e9:b811:da13 with SMTP id 20-20020a056870139400b001e9b811da13mr13124935oas.49.1698744126936; Tue, 31 Oct 2023 02:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698744126; cv=none; d=google.com; s=arc-20160816; b=ME2VW9K1WQIQhE2G+XE8YJyDAiPjihgak0oP4knlZ2YJR3FSa5ptgRfPtxF60cHaSK pcERmL+vjHUySUbm3RlgYepY9jjoGAvPiGHPBg/ZNXX321idaztGOcBjKcy4fZup83mI CvCS1wMadMqQ1wTZgvbxKexU9IQ9xMtSqSnoYqFy0uA7NvXYZPyYUNDQ/w8kR3aPfTmL k0IlR25DUIYpx2Z7KiSsR2XkkMf8wlRH7nZ37m75f82/44aWQQduKlzLEryz8m39Fluq MZblribXCbCPJP2bHZbrM4Dacrs1hy57o+QMk04hkp1Uhy82GjW/9UrOE24JhWJ3kZOH QhrQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=yTeWBDitRUsmDXRS0MWrrJbkHkw69BXtGLkjovhS8/0=; fh=E3ilibYCxplRFz20OpOkjMj1lMKBPGRzcx1abGX98y8=; b=XZVLac5lhFTX59WbzWfpgD1D4WVqMYvW1+eOyXesLxwa22qf2TLfRYG+H8ePHR+UKi 2XBJVcGnQzbwYwLXKW3+lT5FtUJI87ChzbqWOfJxIQ8yC1tf4sTFYCsgJPm7Ri64Qpj9 gsoEMJZ0B+H1pj2c3kjrp7eKNGRnzofxhGyQCZvPPsKIgdf8UwNp5yGvS+ox7FC1Nsu0 BDQSjFxWhW48irLiQQP+aPWBXix08hK8TV4Fh7EuosLN01Y+dw0vgA8+K8NAfXnTMk4l Ch7ueCIEuBgVCtnVboxG/9UaZWhGpcuYp6QfHYk8kWiA/YSl7Y4eDRvpEWOcCWGDi+iL tVpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Uqjq+UmR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id u186-20020a6385c3000000b005ac50a019b3si730727pgd.745.2023.10.31.02.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 02:22:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Uqjq+UmR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 6A2128031D2A; Tue, 31 Oct 2023 02:21:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343842AbjJaJVv (ORCPT <rfc822;gah0developer@gmail.com> + 34 others); Tue, 31 Oct 2023 05:21:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343834AbjJaJVu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 31 Oct 2023 05:21:50 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D752B3; Tue, 31 Oct 2023 02:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698744108; x=1730280108; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yjOXbjPiGipjy8R9wCtdAqsCejHtbndkyznTFcK3Fpc=; b=Uqjq+UmR2IvTvPCDG7eO9mT2BFhfE3yq80xVVJT+JMrtLjkAlxRuDQd0 +raHSMUmHLSUqh18OZPG7Y1K9QU4HF5vraK85DcR0/RdEnFyore2vm8rK /PTyZyxhs6kXCopsk4rNVKO+Q49YOuHWJKXvSdwvkAYhMvufZQCkzTtOq A7oaePsptLh547N3LUTOwYpp++UnBQGM+xR8CLXR88QfYz3CEhnUTW2Zg SuuoXfMWUdqX3yUiFy5NcrzXO4O9142/ZNQJ9YAmZ8XVjZ0MPgfV7AXkM Z5DGH4G4qNT0xi8J3BO5QBixVOCpFkzlb0CfIxfDXKrbe7ma2iZl4NYck Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10879"; a="385435948" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="385435948" 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:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10879"; a="877445514" X-IronPort-AV: E=Sophos;i="6.03,265,1694761200"; d="scan'208";a="877445514" Received: from dmi-pnp-i7.sh.intel.com ([10.239.159.155]) by fmsmga002.fm.intel.com with ESMTP; 31 Oct 2023 02:21:44 -0700 From: Dapeng Mi <dapeng1.mi@linux.intel.com> To: Sean Christopherson <seanjc@google.com>, Paolo Bonzini <pbonzini@redhat.com> Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Zhenyu Wang <zhenyuw@linux.intel.com>, Zhang Xiong <xiong.y.zhang@intel.com>, Jim Mattson <jmattson@google.com>, Mingwei Zhang <mizhang@google.com>, Like Xu <like.xu.linux@gmail.com>, Dapeng Mi <dapeng1.mi@intel.com>, Dapeng Mi <dapeng1.mi@linux.intel.com> Subject: [kvm-unit-tests Patch v2 0/5] Fix PMU test failures on Sapphire Rapids Date: Tue, 31 Oct 2023 17:29:16 +0800 Message-Id: <20231031092921.2885109-1-dapeng1.mi@linux.intel.com> X-Mailer: git-send-email 2.34.1 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 fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 31 Oct 2023 02:21:59 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781262321561787651 X-GMAIL-MSGID: 1781262321561787651 |
Series |
Fix PMU test failures on Sapphire Rapids
|
|
Message
Mi, Dapeng
Oct. 31, 2023, 9:29 a.m. UTC
When running pmu test on Intel Sapphire Rapids, we found several failures are encountered, such as "llc misses" failure, "all counters" failure and "fixed counter 3" failure. Intel Sapphire Rapids introduces new fixed counter 3, total PMU counters including GP and fixed counters increase to 12 and also optimizes cache subsystem. All these changes make the original assumptions in pmu test be unavailable any more on Sapphire Rapids. Patches 2-4 fixes these failures, especially patch 2 improves current loop() function and ensure the LLC/branch misses are always be triggered and don't depend on the possibility like before, patch 1 removes the duplicate code and patch 5 adds asserts to ensure pre-defined fixed events are matched with HW fixed counters. Plese note 1) this patchset depends on the Kernel patches "Enable topdown slots event in vPMU" 2) this patchset is only tested on Intel Sapphire rapids platform, the tests on other platforms are welcomed. Dapeng Mi (4): x86: pmu: Improve loop() to force to generate llc/branch misses x86: pmu: Enlarge cnt array length to 64 in check_counters_many() x86: pmu: Support validation for Intel PMU fixed counter 3 x86: pmu: Add asserts to warn inconsistent fixed events and counters Xiong Zhang (1): x86: pmu: Remove duplicate code in pmu_init() lib/x86/pmu.c | 5 ----- x86/pmu.c | 54 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 33 insertions(+), 26 deletions(-) base-commit: bfe5d7d0e14c8199d134df84d6ae8487a9772c48