All of lore.kernel.org
 help / color / mirror / Atom feed
From: Like Xu <like.xu.linux@gmail.com>
To: Aaron Lewis <aaronlewis@google.com>
Cc: pbonzini@redhat.com, jmattson@google.com, seanjc@google.com,
	kvm list <kvm@vger.kernel.org>
Subject: Re: [PATCH v8 3/7] kvm: x86/pmu: prepare the pmu event filter for masked events
Date: Thu, 22 Dec 2022 14:34:12 +0800	[thread overview]
Message-ID: <1a769c98-68dc-f265-1ce4-f141a9354665@gmail.com> (raw)
In-Reply-To: <20221220161236.555143-4-aaronlewis@google.com>

On 21/12/2022 12:12 am, Aaron Lewis wrote:
> +static bool is_fixed_event_allowed(struct kvm_pmu_event_filter *filter, int idx)
> +{
> +	int fixed_idx = idx - INTEL_PMC_IDX_FIXED;
> +
> +	if (filter->action == KVM_PMU_EVENT_DENY &&
> +	    test_bit(fixed_idx, (ulong *)&filter->fixed_counter_bitmap))
> +		return false;
> +	if (filter->action == KVM_PMU_EVENT_ALLOW &&
> +	    !test_bit(fixed_idx, (ulong *)&filter->fixed_counter_bitmap))
> +		return false;
> +
> +	return true;
> +}

Before masked event is introduced, the decision logic for fixed events is not 
yet covered
by existing and new selftests, which affects the review of new changes to this part.

More selftests on fixed_event is appreciated and required.

  reply	other threads:[~2022-12-22  6:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20 16:12 [PATCH v8 0/7] Introduce and test masked events Aaron Lewis
2022-12-20 16:12 ` [PATCH v8 1/7] kvm: x86/pmu: Correct the mask used in a pmu event filter lookup Aaron Lewis
2022-12-22  6:19   ` Like Xu
2022-12-28 20:00     ` Aaron Lewis
2023-01-03 18:28       ` Sean Christopherson
2022-12-20 16:12 ` [PATCH v8 2/7] kvm: x86/pmu: Remove impossible events from the pmu event filter Aaron Lewis
2022-12-20 16:12 ` [PATCH v8 3/7] kvm: x86/pmu: prepare the pmu event filter for masked events Aaron Lewis
2022-12-22  6:34   ` Like Xu [this message]
2022-12-20 16:12 ` [PATCH v8 4/7] kvm: x86/pmu: Introduce masked events to the pmu event filter Aaron Lewis
2022-12-22  7:40   ` Like Xu
2022-12-28 20:00     ` Aaron Lewis
2022-12-20 16:12 ` [PATCH v8 5/7] selftests: kvm/x86: Add flags when creating a " Aaron Lewis
2022-12-20 16:12 ` [PATCH v8 6/7] selftests: kvm/x86: Add testing for KVM_SET_PMU_EVENT_FILTER Aaron Lewis
2022-12-20 16:12 ` [PATCH v8 7/7] selftests: kvm/x86: Test masked events Aaron Lewis
2023-01-19 20:57 ` [PATCH v8 0/7] Introduce and test " Sean Christopherson
2023-01-20 18:11   ` 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=1a769c98-68dc-f265-1ce4-f141a9354665@gmail.com \
    --to=like.xu.linux@gmail.com \
    --cc=aaronlewis@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.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.