Re: [PATCH v2 2/6] KVM: x86/pmu: Refactoring find_arch_event() to pmc_perf_hw_id()

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

 



On 5/2/2022 9:55 am, Jim Mattson wrote:
+static unsigned int amd_pmc_perf_hw_id(struct kvm_pmc *pmc)
  {
+       u8 event_select = pmc->eventsel & ARCH_PERFMON_EVENTSEL_EVENT;
On AMD, the event select is 12 bits.

Out of your carefulness, we already know this fact.

This function to get the perf_hw_id by the last 16 bits still works because we currently do not have a 12-bits-select event defined in the amd_event_mapping[]. The 12-bits-select
events (if any) will be programed in the type of PERF_TYPE_RAW.

IMO, a minor patch that renames some AMD variables and updates the relevant comments
to avoid misunderstandings is quite acceptable.

Thanks,
Like Xu



[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