Re: [PATCH v11 07/11] KVM: x86: Expose MSR_IA32_PERF_CAPABILITIES for LBR record format

2020-05-19 Thread Sean Christopherson
On Tue, May 19, 2020 at 12:53:35PM +0200, Peter Zijlstra wrote: > On Thu, May 14, 2020 at 04:30:50PM +0800, Like Xu wrote: > > @@ -203,6 +206,12 @@ static int intel_pmu_get_msr(struct kvm_vcpu *vcpu, > > struct msr_data *msr_info) > > case MSR_CORE_PERF_GLOBAL_OVF_CTRL: > > msr_inf

Re: [PATCH v11 07/11] KVM: x86: Expose MSR_IA32_PERF_CAPABILITIES for LBR record format

2020-05-19 Thread Xu, Like
On 2020/5/19 18:53, Peter Zijlstra wrote: On Thu, May 14, 2020 at 04:30:50PM +0800, Like Xu wrote: @@ -203,6 +206,12 @@ static int intel_pmu_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) case MSR_CORE_PERF_GLOBAL_OVF_CTRL: msr_info->data = pmu->global_ovf_ctr

Re: [PATCH v11 07/11] KVM: x86: Expose MSR_IA32_PERF_CAPABILITIES for LBR record format

2020-05-19 Thread Peter Zijlstra
On Thu, May 14, 2020 at 04:30:50PM +0800, Like Xu wrote: > @@ -203,6 +206,12 @@ static int intel_pmu_get_msr(struct kvm_vcpu *vcpu, > struct msr_data *msr_info) > case MSR_CORE_PERF_GLOBAL_OVF_CTRL: > msr_info->data = pmu->global_ovf_ctrl; > return 0; > + case

[PATCH v11 07/11] KVM: x86: Expose MSR_IA32_PERF_CAPABILITIES for LBR record format

2020-05-14 Thread Like Xu
The MSR_IA32_PERF_CAPABILITIES is a read only MSR that enumerates the existence of performance monitoring features and KVM would always set F(PDCM) since worst case it will just be zero. The bits [0, 5] of MSR_IA32_PERF_CAPABILITIES tells about the LBR format of the branch record addresses stored