On 08/21/2012 04:32 PM, Avi Kivity wrote:
> On 08/21/2012 04:11 AM, Yan, Zheng wrote:
>
>>>> There is only one kvm_pmu structure in struct kvm_vcpu_arch, but the uncore
>>>> driver may define dozens of PMUs. Besides the uncore PMUs make extensive
>>>> use
>>>> of extra registers, I don't think we can store these information in kvm_pmu
>>>> structure.
>>>
>>> We don't need to store any information, just respond to those MSRs (and
>>> ignore them).
>>
>> The problem is that there are hundreds of MSRs, but only a few of them are
>> defined in the header file of uncore driver. The uncore driver computes
>> addresses of the rest MSRs by using uncore box index and counter index.
>
> You can do the same in kvm. Maybe even move the functions that compute
> the addresses to a header, so that they can be shared.
>
> Can you point me at the code? Maybe I'm misunderstanding something here.
>
The code are located at linux/arch/x86/kernel/cpu/perf_event_intel_uncore.{h,c}.
Regards
Yan, Zheng
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html