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

Sean Christopherson
2020-05-19T15:12:47Z

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_info->data = pmu->global_ovf_ctrl;
> > return 0;
> > + case MSR_IA32_PERF_CAPABILITIES:
> > + if (!msr_info->host_initiated &&
> > + !guest_cpuid_has(vcpu, X86_FEATURE_PDCM))
> > + return 1;
>
> I know this is KVM code, so maybe they feel differently, but I find the
> above indentation massively confusing. Consider using: "set cino=:0(0"
> if you're a vim user.

I most definitely don't feel differently. I would be strongly in favor of
making that pattern a checkpatch error.