All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Aaron Lewis <aaronlewis@google.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, jmattson@google.com,
	like.xu.linux@gmail.com
Subject: Re: [PATCH v3 3/5] KVM: selftests: Add helpers for PMC asserts
Date: Fri, 7 Apr 2023 11:47:11 -0700	[thread overview]
Message-ID: <ZDBlL/MZLAcYKpwN@google.com> (raw)
In-Reply-To: <20230307141400.1486314-4-aaronlewis@google.com>

Same issue on this one, it's not obvious that the helper is being added to a single
test.

On Tue, Mar 07, 2023, Aaron Lewis wrote:
> Add the helpers, ASSERT_PMC_COUNTING and ASSERT_PMC_NOT_COUNTING, to
> split out the asserts into one place.  This will make it easier to add
> additional asserts related to counting later on.
> 
> No functional changes intended.
> 
> Signed-off-by: Aaron Lewis <aaronlewis@google.com>
> ---
>  .../kvm/x86_64/pmu_event_filter_test.c        | 70 ++++++++++---------
>  1 file changed, 36 insertions(+), 34 deletions(-)
> 
> diff --git a/tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c b/tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c
> index f33079fc552b..8277b8f49dca 100644
> --- a/tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c
> +++ b/tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c
> @@ -250,14 +250,27 @@ static struct kvm_pmu_event_filter *remove_event(struct kvm_pmu_event_filter *f,
>  	return f;
>  }
>  
> +#define ASSERT_PMC_COUNTING(count)							\

Looking at the future patches, I think it makes sense to append INSTRUCTIONS to
the name to clarify what it's counting.  That's arguably slightly misleading for
counting branch instructions, but they are still instructions...

  reply	other threads:[~2023-04-07 18:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 14:13 [PATCH v3 0/5] Fix "Instructions Retired" from incorrectly counting Aaron Lewis
2023-03-07 14:13 ` [PATCH v3 1/5] KVM: x86/pmu: Prevent the PMU from counting disallowed events Aaron Lewis
2023-03-07 15:19   ` Like Xu
2023-03-07 15:52     ` Aaron Lewis
2023-03-07 16:01       ` Sean Christopherson
2023-03-08  2:45         ` Like Xu
2023-03-08 19:46           ` Sean Christopherson
2023-03-07 14:13 ` [PATCH v3 2/5] KVM: selftests: Add a common helper to the guest Aaron Lewis
2023-04-07 18:43   ` Sean Christopherson
2023-03-07 14:13 ` [PATCH v3 3/5] KVM: selftests: Add helpers for PMC asserts Aaron Lewis
2023-04-07 18:47   ` Sean Christopherson [this message]
2023-03-07 14:13 ` [PATCH v3 4/5] KVM: selftests: Fixup test asserts Aaron Lewis
2023-04-07 18:53   ` Sean Christopherson
2023-03-07 14:14 ` [PATCH v3 5/5] KVM: selftests: Test the PMU event "Instructions retired" Aaron Lewis
2023-04-07 20:17   ` Sean Christopherson
2023-04-07  9:06 ` [PATCH v3 0/5] Fix "Instructions Retired" from incorrectly counting Like Xu
2023-04-07 21:30 ` Sean Christopherson

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=ZDBlL/MZLAcYKpwN@google.com \
    --to=seanjc@google.com \
    --cc=aaronlewis@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=like.xu.linux@gmail.com \
    --cc=pbonzini@redhat.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.