Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2529820rda; Wed, 25 Oct 2023 05:39:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMwCvSG+u2AwvHZ1Bwp2pcwDAHfjS7HlG1K5r1FkSSbeDH43toxpJhxv1p2/w7XaRGw3gG X-Received: by 2002:a0d:e84c:0:b0:5a8:277f:b378 with SMTP id r73-20020a0de84c000000b005a8277fb378mr14439137ywe.1.1698237545374; Wed, 25 Oct 2023 05:39:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698237545; cv=none; d=google.com; s=arc-20160816; b=KWeoVIS+yjQjAACF78YTxXp8OwcB7v/LGSZFAnFzZyYvVVZxBwxsyUDM5sqtQm6ksP RBkps3mCxvxgQr+6j8EgfQq/PVM66W9ib+WTPC/DsXr01jpgl1rCsX2C6USvSJQsj4jj MsBQ8lRIPj04J3hn4qf7fn7sJtZJMkaliN4vSR12vTtf3bRBcSgwGvbuexi7oyGocbjT gqO7DjGgn9bcRHh8shPs2l0+2HLLJsBgRZGF51mOZZ6KfEeyuyoU3KgCa3fDy+Dra4Js NsCXfgbuW3e64NTcjBgxwKcxb5IQuKZcLj6jz1ezGKBtUcHlY4UkMO2duT8iJMEL8Rep RHhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=W3l3fK8JlnRDjMYiAMXlKadC5mulz1cY1IxH7egtavM=; fh=uHS0/9G41/xc7SfwaImOsh2CmuncZhRxHxVdkkWVxmc=; b=WeNspnzN8vvUTeX0LNQqg8/IcXY2bJ4aAkLkaY8kExM1OvOQ3Z5SL1Phow/YgoZeEa mp6VpBLSZw4wQcb1pYjlGUSheHpADBGo6x3PKrvAHsnZFTXXLHK81M5EeBhaf6qtW4lr K6hLCfvVYM3H4TkUITiL6aVv6N3yAWtmTWFaoBowl4P8a4BfQbsPLSEb0HpA3nJq06F3 YCTm9iSgIhBWkLNVBVrNIs2gWq409fekr1OoPD3Akq6o80W820aGNDU/i4o3GdUE7FFJ imrcKu7eyc1r8jLa2Izd7nsY/HYvgsORL3euRH/QGT6bdhup84woP+Nuogu1MwwWwR7b yZqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=bFFgKStk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id n17-20020a819e51000000b005a7aa4fa74esi10711484ywj.534.2023.10.25.05.39.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 05:39:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=bFFgKStk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C313D80BE2CB; Wed, 25 Oct 2023 05:39:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344043AbjJYMim (ORCPT + 99 others); Wed, 25 Oct 2023 08:38:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234862AbjJYMil (ORCPT ); Wed, 25 Oct 2023 08:38:41 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FFA8C1 for ; Wed, 25 Oct 2023 05:38:39 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-53f98cbcd76so9720a12.1 for ; Wed, 25 Oct 2023 05:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698237518; x=1698842318; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=W3l3fK8JlnRDjMYiAMXlKadC5mulz1cY1IxH7egtavM=; b=bFFgKStkFAry370sQGddW0mcTkJIE6k4/z2ZOaQjKIalzxTfWLEQBF8NzLLL7tLYjd DxLWT0UsCFkeBoAK4UwuuvXSaIfdp/UaWfWqo0ZHiturCM8hr6hEbY3Jolis4YKqk9gM NHWLrT8xqV2JUY2ZFCfbifNbbYIk70e+4USi5NtubxezhIUhVaTPOaEG/2myBNhOGUVk w2q+hh02okgpaGzxKVl8k1KXXJ5+GskvoT4z8CLcEuo0kA1oteMmfJDPvyBTOScdmnPz AkLQzheupyhecLjaYf+J+GOinlCXoid/Cf7lGVERDODSr6nrwjHQZGPX7qfHTZ7pLyb6 iUHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698237518; x=1698842318; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W3l3fK8JlnRDjMYiAMXlKadC5mulz1cY1IxH7egtavM=; b=BLmx0wTsZa4dR8/1QT9cfseDZ3mBInqPLdHMYVG3QJOOas++l+eOkTmZIltjoxa5eP JgrBFRAdfz0y6x2L0HLs6cZ5chKG0G2lEhRgza3Z6/THlPHO7wAgIWo5/2mLdWC1dUwN 5i5x3sZ+/W1peVtn8BB84X449qyiw6RDJG898V2plEVGdmHgZR84UoP3A3bzAGqNHV62 NV7FZyyOGEXGHoADbX3WIuDyUoXj/1gzVBryRKaR5IP6gVddqsWic910XyQkdTBy8dWE bn+nTnwGQeA3X/8xSkzopBWuw0tUX5wzUBNxxlLJEkTEwkousL4FgBOv7yHoGBJcA1I9 S22g== X-Gm-Message-State: AOJu0YxsJEjbRGUXrm16Lery6be7qa1B6yF1+ksTHrZcR3IoZ41j93Vm YEr1M8iLRWc3pc50f0UaFhxCSlptO96bVKozssti6n8EelqoHvHqcUM= X-Received: by 2002:a50:9556:0:b0:53f:c607:c87a with SMTP id v22-20020a509556000000b0053fc607c87amr73797eda.7.1698237517682; Wed, 25 Oct 2023 05:38:37 -0700 (PDT) MIME-Version: 1.0 References: <20231024075748.1675382-1-dapeng1.mi@linux.intel.com> <20231024075748.1675382-5-dapeng1.mi@linux.intel.com> <305f1ee4-a8c3-48eb-9368-531329e5266e@linux.intel.com> In-Reply-To: <305f1ee4-a8c3-48eb-9368-531329e5266e@linux.intel.com> From: Jim Mattson Date: Wed, 25 Oct 2023 05:38:25 -0700 Message-ID: Subject: Re: [kvm-unit-tests Patch 4/5] x86: pmu: Support validation for Intel PMU fixed counter 3 To: "Mi, Dapeng" Cc: Sean Christopherson , Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Zhenyu Wang , Zhang Xiong , Mingwei Zhang , Like Xu , Dapeng Mi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Wed, 25 Oct 2023 05:39:02 -0700 (PDT) On Wed, Oct 25, 2023 at 4:26=E2=80=AFAM Mi, Dapeng wrote: > > > On 10/25/2023 3:05 AM, Jim Mattson wrote: > > On Tue, Oct 24, 2023 at 12:51=E2=80=AFAM Dapeng Mi wrote: > >> 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 add code to validate this new fixed counter. > > Can you explain how this "validates" anything? > > > I may not describe the sentence clearly. This would validate the fixed > counter 3 can count the slots event and get a valid count in a > reasonable range. Thanks. I thought the current vPMU implementation did not actually support top-down slots. If it doesn't work, how can it be validated? > > > > >> Signed-off-by: Dapeng Mi > >> --- > >> x86/pmu.c | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >> diff --git a/x86/pmu.c b/x86/pmu.c > >> index 1bebf493d4a4..41165e168d8e 100644 > >> --- a/x86/pmu.c > >> +++ b/x86/pmu.c > >> @@ -46,7 +46,8 @@ struct pmu_event { > >> }, fixed_events[] =3D { > >> {"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 3", MSR_CORE_PERF_FIXED_CTR0 + 2, 0.1*N, 30*N}, > >> + {"fixed 4", MSR_CORE_PERF_FIXED_CTR0 + 3, 1*N, 100*N} > >> }; > >> > >> char *buf; > >> -- > >> 2.34.1 > >>