Re: [PATCH v6 4/7] kvm: x86/pmu: Introduce masked events to the pmu event filter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 16, 2022 at 9:55 AM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> On Thu, Dec 15, 2022, Like Xu wrote:
> > On 22/10/2022 4:51 am, Aaron Lewis wrote:
> > > --- a/include/uapi/linux/kvm.h
> > > +++ b/include/uapi/linux/kvm.h
> > > @@ -1178,6 +1178,7 @@ struct kvm_ppc_resize_hpt {
> > >   #define KVM_CAP_S390_ZPCI_OP 221
> > >   #define KVM_CAP_S390_CPU_TOPOLOGY 222
> > >   #define KVM_CAP_DIRTY_LOG_RING_ACQ_REL 223
> > > +#define KVM_CAP_PMU_EVENT_MASKED_EVENTS 224
> >
> > I presume that the linux/tools code in google's internal tree
> > can directly refer to the various definitions in the kernel headers.
> >
> > Otherwise, how did the newly added selftest get even compiled ?
>
> Magic fairy dust, a.k.a. `make headers_install`.  KVM selftests don't actually
> get anything from tools/include/uapi/ or tools/arch/<arch>/include/uapi/, the
> only reason the KVM headers are copied there are for perf usage.  And if it weren't
> for perf, I'd delete them from tools/, because keeping them in sync is a pain.
>
> To get tools' uapi copies, KVM selftests would need to change its include paths
> or change a bunch of #includes to do <uapi/...>.
>
> > Similar errors include "union cpuid10_eax" from perf_event.h
>
> I don't follow this one.  Commit bef9a701f3eb ("selftests: kvm/x86: Add test for
> KVM_SET_PMU_EVENT_FILTER") added the union definition in pmu_event_filter_test.c

That's been replaced since posting.  The function num_gp_counters()
needs to be placed with
kvm_cpu_property(X86_PROPERTY_PMU_NR_GP_COUNTERS).  I can update and
repost.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux