On 11/03/2014 12:39 PM, Radim Krčmář wrote: > 2014-11-03 12:23-0600, Wei Huang: >> >> >> On 11/03/2014 11:56 AM, Radim Krčmář wrote: >>> 2014-10-31 12:05-0400, Wei Huang: >>>> Currently KVM only supports vPMU for Intel platforms. This patch set >>>> enable vPMU support for AMD platform by creating a common PMU >>>> interface for x86. The PMU calls from guest VMs are dispatched >>>> to corresponding functions defined in arch specific files. >>> >>> The functionality looks good, so I just want verify the basic design: >>> why don't we emulate AMD PMU on Intel, and vice versa? >>> (Underlying PERF_COUNTs are identical in both.) >> >> Thanks. The underlining perf counters can be very different between AMD >> and Intel. I think we can emulate AMD on Intel, or vice versa, for some >> common perfmon_events (such as PERF_COUNT_HW_CPU_CYCLES). But as soon as >> guest VMs access raw counters (see PERF_TYPE_RAW), we can't emulate them >> anymore. > > Thanks, I guess raw counters are used more than I thought, so code > complexity would overshadow the gain of having at least something. To be honest I did try. But it became a big rat-hole as soon as I tried to abstract them. This problem also applies to Intel CPUs between generations, if perf counters are not arch_counters. -Wei > > And then, there is the always perfect, "who cares" :) > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html