From: Sean Christopherson <seanjc@google.com>
To: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, Like Xu <like.xu.linux@gmail.com>,
Mingwei Zhang <mizhang@google.com>,
Zhenyu Wang <zhenyuw@linux.intel.com>,
Zhang Xiong <xiong.y.zhang@intel.com>,
Lv Zhiyuan <zhiyuan.lv@intel.com>,
Dapeng Mi <dapeng1.mi@intel.com>
Subject: Re: [kvm-unit-tests PATCH 3/4] x86/pmu: Test adaptive PEBS without any adaptive counters
Date: Wed, 5 Jun 2024 09:17:35 -0700 [thread overview]
Message-ID: <ZmCPn31tAFumFS4m@google.com> (raw)
In-Reply-To: <0624663e-ea7c-470f-ab34-c934a9ab31be@linux.intel.com>
On Thu, Mar 07, 2024, Dapeng Mi wrote:
> On 3/7/2024 7:01 AM, Sean Christopherson wrote:
> > @@ -293,12 +293,9 @@ static void check_pebs_records(u64 bitmask, u64 pebs_data_cfg)
> > do {
> > pebs_rec = (struct pebs_basic *)cur_record;
> > pebs_record_size = pebs_rec->format_size >> RECORD_SIZE_OFFSET;
> > - pebs_idx_match =
> > - pebs_rec->applicable_counters & bitmask;
> > - pebs_size_match =
> > - pebs_record_size == get_adaptive_pebs_record_size(pebs_data_cfg);
> > - data_cfg_match =
> > - (pebs_rec->format_size & GENMASK_ULL(47, 0)) == pebs_data_cfg;
> > + pebs_idx_match = pebs_rec->applicable_counters & bitmask;
> > + pebs_size_match = pebs_record_size == get_pebs_record_size(pebs_data_cfg, use_adaptive);
> > + data_cfg_match = (pebs_rec->format_size & GENMASK_ULL(47, 0)) == pebs_data_cfg;
>
> Since there is already a macro RECORD_SIZE_OFFSET, we'd better use
> "RECORD_SIZE_OFFSET - 1" to replace the magic number 47.
Very belatedly, I disagree. That the data configuration mask isn't derived from
record size. The fact that the record size is the _only_ info that's excluded
is coincidental (sort of, that's not quite the right word), i.e. if we want to
use a #define, then we should add an explicit define, not abuse RECORD_SIZE_OFFSET.
next prev parent reply other threads:[~2024-06-05 16:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 23:01 [kvm-unit-tests PATCH 0/4] x86/pmu: PEBS fixes and new testcases Sean Christopherson
2024-03-06 23:01 ` [kvm-unit-tests PATCH 1/4] x86/pmu: Enable PEBS on fixed counters iff baseline PEBS is support Sean Christopherson
2024-03-07 9:22 ` Mi, Dapeng
2024-03-06 23:01 ` [kvm-unit-tests PATCH 2/4] x86/pmu: Iterate over adaptive PEBS flag combinations Sean Christopherson
2024-03-06 23:01 ` [kvm-unit-tests PATCH 3/4] x86/pmu: Test adaptive PEBS without any adaptive counters Sean Christopherson
2024-03-07 9:08 ` Like Xu
2024-03-07 9:28 ` Mi, Dapeng
2024-06-05 16:17 ` Sean Christopherson [this message]
2024-03-07 10:00 ` Mi, Dapeng
2024-03-06 23:01 ` [kvm-unit-tests PATCH 4/4] x86/pmu: Add a PEBS test to verify the host LBRs aren't leaked to the guest Sean Christopherson
2024-03-07 9:23 ` Like Xu
2024-03-07 9:31 ` Mi, Dapeng
2024-03-07 9:22 ` [kvm-unit-tests PATCH 0/4] x86/pmu: PEBS fixes and new testcases Mi, Dapeng
2024-06-05 23:20 ` Sean Christopherson
2024-06-06 0:51 ` Mi, Dapeng1
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZmCPn31tAFumFS4m@google.com \
--to=seanjc@google.com \
--cc=dapeng1.mi@intel.com \
--cc=dapeng1.mi@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=like.xu.linux@gmail.com \
--cc=mizhang@google.com \
--cc=pbonzini@redhat.com \
--cc=xiong.y.zhang@intel.com \
--cc=zhenyuw@linux.intel.com \
--cc=zhiyuan.lv@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.