Re: [PATCH v5 12/12] KVM/VMX/vPMU: support to report GLOBAL_STATUS_LBRS_FROZEN

2019-02-17 Thread Wei Wang
On 02/15/2019 09:10 PM, Andi Kleen wrote: OK. The freeze bits need to be cleared by IA32_PERF_GLOBAL_STATUS_RESET, which seems not supported by the perf code yet (thus guest won't clear them). Would handle_irq_v4 also need to be changed to support that? In Arch Perfmon v4 it is cleared by

Re: [PATCH v5 12/12] KVM/VMX/vPMU: support to report GLOBAL_STATUS_LBRS_FROZEN

2019-02-15 Thread Andi Kleen
On Fri, Feb 15, 2019 at 08:56:02AM +, Wang, Wei W wrote: > On Friday, February 15, 2019 12:32 AM, Andi Kleen wrote: > > > > > +static void intel_pmu_get_global_status(struct kvm_pmu *pmu, > > > + struct msr_data *msr_info) > > > +{ > > > + u64 guest_debugctl,

RE: [PATCH v5 12/12] KVM/VMX/vPMU: support to report GLOBAL_STATUS_LBRS_FROZEN

2019-02-15 Thread Wang, Wei W
On Friday, February 15, 2019 12:32 AM, Andi Kleen wrote: > > > +static void intel_pmu_get_global_status(struct kvm_pmu *pmu, > > + struct msr_data *msr_info) > > +{ > > + u64 guest_debugctl, freeze_lbr_bits = > DEBUGCTLMSR_FREEZE_LBRS_ON_PMI | > > +

Re: [PATCH v5 12/12] KVM/VMX/vPMU: support to report GLOBAL_STATUS_LBRS_FROZEN

2019-02-14 Thread Andi Kleen
> +static void intel_pmu_get_global_status(struct kvm_pmu *pmu, > + struct msr_data *msr_info) > +{ > + u64 guest_debugctl, freeze_lbr_bits = DEBUGCTLMSR_FREEZE_LBRS_ON_PMI | > + DEBUGCTLMSR_LBR; > + > + if