Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3588846ybk; Tue, 19 May 2020 08:14:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynSj3Gl71YLCHxew/Be8lp4xO3HDQ48zfrWL/eYozs5qHO+TcJ7WudIdrW2hmkHq4UaJTp X-Received: by 2002:aa7:c944:: with SMTP id h4mr13987200edt.383.1589901291199; Tue, 19 May 2020 08:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589901291; cv=none; d=google.com; s=arc-20160816; b=QDHbZsFfDp4Cl43y1/22evQpTbT3OyFn4qB/gmMoEMF/a8GVZFc7/vk+FLhtk5rvr7 V+BA250kpWRsnjfsuWQJ+QQDBWlQwrwsQPPAF1EMC6D4FLWx89wSzXOzIDiSiCHYf0t3 CRstdKW2zbh5cy5WPqYzrMN386p06iJkrYFuvoWWZUJMmak+Ud2j6tKDHRzqC7oVpvb+ wHdFBOeMYn5R6VxLqpYDW2+E58oqxntjb6ev2/EJrkuSXEfqCnZAW0bCtlBiuPmG/7UR rRLhfDzXxquXWSpOlSNyQffmOiYMA1KZFWuDJLxC59S31qIgZ3J8vA/qc3JJgI5QPw0U ws7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=LKFw8JbLSW9MSWAYQccY4DXjrNenLNLIRwwlZwDHw1A=; b=gsEMTWLlaw+CzVk2uoiImzY3CNKTiHSu1djm6ld3EIuceGaOgcOYJXkEjMVPMuR1W3 18Woj20cPHFt2oyLddKTg3mung3H3rxEnKX2s7PiA39YO/JcpXgBlc53cM5QuHuLe+uU 4LVZyiflsUm8APkYB7URZt7Y2ZhIdepg1F9YTAv7sYElCVmRSY9lQ9RkCguVHtqpSiCu l6pLDJvHuDdnhoWqC2lEFBjwHSiMOL8VEQa/W75UcoxmVP/V0j1H8FJqbWVh8eAitTwX KU7ao6qLCTZk/buWk7otjGNbjg+M82pDdCn3ONHHflaeq1Xod34D2oUFDiRvB+hbFERQ 8TVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si5093012edf.46.2020.05.19.08.14.25; Tue, 19 May 2020 08:14:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729204AbgESPMn (ORCPT + 99 others); Tue, 19 May 2020 11:12:43 -0400 Received: from mga18.intel.com ([134.134.136.126]:50621 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728775AbgESPMn (ORCPT ); Tue, 19 May 2020 11:12:43 -0400 IronPort-SDR: dcJ7P5+XWzqpOgDPAcXUAt116GMieokwr+YZsUQpbwQlISjYS5SCkA9UWn4ssDokauJAYdN/cy t2MZFvqKdqdA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2020 08:12:43 -0700 IronPort-SDR: HKo2/GA0KmwgNBM6wnjMvauWnf5GnBUMLwi059UT4U4krllDSIRdzPslzgoVCwRJEhrqTM96gl uGO1PZp4GbVA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,410,1583222400"; d="scan'208";a="282348276" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.152]) by orsmga002.jf.intel.com with ESMTP; 19 May 2020 08:12:42 -0700 Date: Tue, 19 May 2020 08:12:42 -0700 From: Sean Christopherson To: Peter Zijlstra Cc: Like Xu , Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , ak@linux.intel.com, wei.w.wang@intel.com Subject: Re: [PATCH v11 07/11] KVM: x86: Expose MSR_IA32_PERF_CAPABILITIES for LBR record format Message-ID: <20200519151242.GA13603@linux.intel.com> References: <20200514083054.62538-1-like.xu@linux.intel.com> <20200514083054.62538-8-like.xu@linux.intel.com> <20200519105335.GF279861@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200519105335.GF279861@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.