public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Aaron Lewis <aaronlewis@google.com>
Cc: Like Xu <like.xu.linux@gmail.com>,
	pbonzini@redhat.com, jmattson@google.com,
	kvm list <kvm@vger.kernel.org>
Subject: Re: [PATCH v8 1/7] kvm: x86/pmu: Correct the mask used in a pmu event filter lookup
Date: Tue, 3 Jan 2023 18:28:00 +0000	[thread overview]
Message-ID: <Y7RzsEbNqKPUiCWr@google.com> (raw)
In-Reply-To: <CAAAPnDE2HjrDbgzJgj7G6=5NQ11BJ=x4wmEStJkoPPCyWQmK_w@mail.gmail.com>

On Wed, Dec 28, 2022, Aaron Lewis wrote:
> > > diff --git a/arch/x86/kvm/pmu.h b/arch/x86/kvm/pmu.h
> > > index 85ff3c0588ba..5b070c563a97 100644
> > > --- a/arch/x86/kvm/pmu.h
> > > +++ b/arch/x86/kvm/pmu.h
> > > @@ -40,6 +40,8 @@ struct kvm_pmu_ops {
> > >       void (*reset)(struct kvm_vcpu *vcpu);
> > >       void (*deliver_pmi)(struct kvm_vcpu *vcpu);
> > >       void (*cleanup)(struct kvm_vcpu *vcpu);
> > > +
> > > +     const u64 EVENTSEL_EVENT;
> >
> > Isn't it weird when the new thing added here is
> > not of the same type as the existing members ?
> >
> > Doesn't "pmu->raw_event_mask" help here ?
> >
> 
> In earlier revisions I had this as a callback, but it was a little
> awkward being that I really just wanted it to be a const that differed
> depending on platform.  Making it a const fit more naturally when
> using it than the callback approach, so despite it being different
> from the others here I think it works better overall.

And KVM already does similar things in kvm_x86_ops.

  reply	other threads:[~2023-01-03 18:28 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 [this message]
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
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=Y7RzsEbNqKPUiCWr@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox