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.