Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp349747rdf; Tue, 21 Nov 2023 04:43:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2AUims2m5oE6o1C9L7gVZXKQmcQq3trFlCU3qUYAyNhesGIIAAj1rF2+YxRBs+ksz/0UK X-Received: by 2002:a05:6a20:8f13:b0:187:72e7:6d98 with SMTP id b19-20020a056a208f1300b0018772e76d98mr3653724pzk.3.1700570602918; Tue, 21 Nov 2023 04:43:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700570602; cv=none; d=google.com; s=arc-20160816; b=bk43JEiaD/43tbcq9y0/pA1LEEQjE8G+D+z0hW7bQD2pz9rjFdnzVg2NLOXXGRfHPR 79MQN5bM1fauglJQZckswG2UbyIFrKNcSYT1w0M6QTvNWWFuAph3vr6KvDbETH7lyX/6 0n2rqGDhvYyi9+s2Yvenf1ZP44zgovvh1dFIe9B/ZAw9Q7h6d8AHDp1xbXeFlWHRN1SM vzEfihNUm7H1e6fkI8k1LQAOGTvgdu+9xXgZIedUw2kIyftwYVpNng6uf27mcDVQ1ybv fEnJCWbu15Z7iNNqXluhVLmKNffcCs1KXZwEGNpqJng1iBCBICzpHMkgireg4W2ZIR5L jRSg== 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=SUS5AAycUPra3QRb1a1l2OTUftQ2VV1hu5zt1uUQBW0=; fh=sIMbrHW6XchtO8J++xKMvfnuMh37piioh5cqciNSK/o=; b=t0aLzH4g4XFN2LMBbIso/D1DCjvMaeix84ItzzYtH1ZIYBdQ+gF3UWRIUoXqzqrGXQ L94GKCjYoegy+aR3RF4b6R+KEiSkpMrcrh7SAhs1zh3B1uxwu9tql0daGRimcLeFeUOR A4WL9M9z/hxJDI8morfQ7anOIIOxgxgpDFHz0O2k17nF/NZvVUORiao4o2lh7XqhJ9io ILMAd7rLUy+ndGyXxy0D6x5jPoTFjopyvbSEb4YTCyGlUckd8OkY9HzqqEVlxmMPxpaP d6kh8IBkMuEk16x10WY2E9I3AK95ZGT+RWt3wvtQzs62tSmpamYK3IgQA7Vfh1fOc4mO CDjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=b517btZr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id d7-20020a056a0010c700b006b905fe37b7si10599857pfu.221.2023.11.21.04.43.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 04:43:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=b517btZr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 75239806A410; Tue, 21 Nov 2023 04:42:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234467AbjKULzj (ORCPT + 99 others); Tue, 21 Nov 2023 06:55:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233997AbjKULzg (ORCPT ); Tue, 21 Nov 2023 06:55:36 -0500 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A673612E; Tue, 21 Nov 2023 03:55:32 -0800 (PST) Received: by mail-pl1-x643.google.com with SMTP id d9443c01a7336-1cf6373ce31so13277735ad.0; Tue, 21 Nov 2023 03:55:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700567732; x=1701172532; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SUS5AAycUPra3QRb1a1l2OTUftQ2VV1hu5zt1uUQBW0=; b=b517btZruh6n8FTnOx8hf5CGFi8f+43DZhjblYLvPEkjDoOrrBSI5Eo94IeGXgvVAm DgWM2BfpdMbgRK7HyfRWwpEs67d2vxtTuPS8adcNveGJ0k6vpKdFkOWooaiBgp2RElFQ +00VslggcQM6IZ9mgqeRKFAvAdN0zir/gEMQvLE5F3afj6qG5Lu4+Y+xVrgij7tjB0wE seBiL0ewKEkbmZ7bd5FRf6v1JkTlUVssmUgIE1ymFWJMVvdjvKodirZug9G8/RHELEKW NwOT1/+FR3vQ3cmA3PPLvbBGXCY0yUOHyyz14lJxG6vuaYPEC9WbooScVCyiHhL9KmfR MXNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700567732; x=1701172532; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SUS5AAycUPra3QRb1a1l2OTUftQ2VV1hu5zt1uUQBW0=; b=ZCxwrvmYak+YG5edyrm/cnGcRCOSFF0moQOOqNyiM8XQXipKZAI1QeB9i5PL+yOtrr GV6vp+VRsfC88GzyGvkX22pQB/0AVarkV4vlzhsOkDXnSHln5mrlJdPT/aTZUG1J9NFg tPgAopT7Nef03BzukrHa0rKyXAY2phK8ZZh+VHHql5EIs24nT242l2rcxXbC2RQSArTc HTUsRptNkugZsiwjqJyfEuxV05ramPmkiCA5ztT7BPAG5ZEsiDU8BN8qktljMe9E8WIF wkBir5qjPElB9E8cxGJ1DGkfQA5VnR4b4ymRTsLkKbyRjlukzxA3BaynrCptxom7snn/ BMuA== X-Gm-Message-State: AOJu0YwNeoG/lDpy/S7iUqa2rHTL51h0ijGOUDOKPftFyFJ+/II3/1B7 8+Zw7NXMnORoTEKL2KrD3Do= X-Received: by 2002:a17:902:d4c6:b0:1cf:5806:564f with SMTP id o6-20020a170902d4c600b001cf5806564fmr3678872plg.10.1700567732047; Tue, 21 Nov 2023 03:55:32 -0800 (PST) Received: from localhost.localdomain ([103.7.29.32]) by smtp.gmail.com with ESMTPSA id g10-20020a170902740a00b001cc1dff5b86sm7685431pll.244.2023.11.21.03.55.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 03:55:31 -0800 (PST) From: Jinrong Liang X-Google-Original-From: Jinrong Liang To: Sean Christopherson Cc: Paolo Bonzini , Like Xu , Jim Mattson , Aaron Lewis , Wanpeng Li , Jinrong Liang , Jinrong Liang , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/9] Test the consistency of AMD PMU counters and their features Date: Tue, 21 Nov 2023 19:54:48 +0800 Message-Id: <20231121115457.76269-1-cloudliang@tencent.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 04:42:41 -0800 (PST) Hi, This series is an addition to below patch set: KVM: x86/pmu: selftests: Fixes and new tests https://lore.kernel.org/all/20231110021306.1269082-1-seanjc@google.com/ Add selftests for AMD PMU counters, including tests for basic functionality of AMD PMU counters, numbers of counters, AMD PMU versions, PerfCtrExtCore and AMD PerfMonV2 features. Also adds PMI tests for Intel gp and fixed counters. All patches have been tested on both Intel and AMD machines, with one exception AMD Guest PerfMonV2 has not been tested on my AMD machine, as does not support PerfMonV2. If Sean fixed the issue of not enabling forced emulation to generate #UD when applying the "KVM: x86/pmu: selftests: Fixes and new tests" patch set, then the patch "KVM: selftests: Add forced emulation check to fix #UD" can be dropped. Any feedback or suggestions are greatly appreciated. Sincerely, Jinrong Jinrong Liang (9): KVM: selftests: Add forced emulation check to fix #UD KVM: selftests: Test gp counters overflow interrupt handling KVM: selftests: Test fixed counters overflow interrupt handling KVM: selftests: Add x86 feature and properties for AMD PMU in processor.h KVM: selftests: Test AMD PMU performance counters basic functions KVM: selftests: Test consistency of AMD PMU counters num KVM: selftests: Test consistency of PMU MSRs with AMD PMU version KVM: selftests: Test AMD Guest PerfCtrExtCore KVM: selftests: Test AMD Guest PerfMonV2 .../selftests/kvm/include/x86_64/processor.h | 3 + .../selftests/kvm/x86_64/pmu_counters_test.c | 446 ++++++++++++++++-- 2 files changed, 400 insertions(+), 49 deletions(-) base-commit: c076acf10c78c0d7e1aa50670e9cc4c91e8d59b4 prerequisite-patch-id: e33e3cd1ff495ffdccfeca5c8247dc8af9996b08 prerequisite-patch-id: a46a885c36e440f09701b553d5b27cb53f6b660f prerequisite-patch-id: a9ac79bbf777b3824f0c61c45a68f1308574ab79 prerequisite-patch-id: cd7b82618866160b5ac77199b681148dfb96e341 prerequisite-patch-id: df5d1c23dd98d83ba3606e84eb5f0a4cd834f52c prerequisite-patch-id: e374d7ce66c66650f23c066690ab816f81e6c3e3 prerequisite-patch-id: 11f133be9680787fe69173777ef1ae448b23168c prerequisite-patch-id: eea75162480ca828fb70395d5c224003ea5ae246 prerequisite-patch-id: 6b7b22b6b56dd28bd80404e1a295abef60ecfa9a prerequisite-patch-id: 2a078271ce109bb526ded7d6eec12b4adbe26cff prerequisite-patch-id: e51c5c2f34fc9fe587ce0eea6f11dc84af89a946 prerequisite-patch-id: 8c1c276fc6571a99301d18aa00ad8280d5a29faf prerequisite-patch-id: 37d2f2895e22bae420401e8620410cd628e4fb39 prerequisite-patch-id: 1abba01ee49d71c38386afa9abf1794130e32a2c prerequisite-patch-id: a7486fd15be405a864527090d473609d44a99c3b prerequisite-patch-id: 41993b2eef8d1e2286ec04b3c1aa1a757792bafe prerequisite-patch-id: 9442b1b4c370b1a68c32eaa6ce3ee4c5d549efd0 prerequisite-patch-id: 89b2e89917a89713d6a63cbd594f6979f4d06578 prerequisite-patch-id: 1e9fe564790f41cfd52ebafc412434608187d8db prerequisite-patch-id: 7d0b2b4af888fe09eae85ebfe56b4daed71aa08c prerequisite-patch-id: 4e6910c90ae769b7556f6aec40f5d600285fe4d0 prerequisite-patch-id: 5248bc19b00c94188b803a4f41fa19172701d7b0 prerequisite-patch-id: f9310c716dbdcbe9e3672e29d9e576064845d917 prerequisite-patch-id: 21b2c6b4878d2ce5a315627efa247240335ede1e prerequisite-patch-id: e01570f8ff40aacba38f86454572803bd68a1d59 prerequisite-patch-id: 65eea4f11ce5e8f9836651c593b7e563b0404459 -- 2.39.3