Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3466564ybk; Tue, 19 May 2020 05:31:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxowOCMN85GAWN5alKFGocFbTnoDHnHCiOKvSJHtcyw7kSs1fB+E+3dRIDt2lgP6REzzuz5 X-Received: by 2002:aa7:dd0a:: with SMTP id i10mr16887904edv.291.1589891489034; Tue, 19 May 2020 05:31:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589891489; cv=none; d=google.com; s=arc-20160816; b=niS+JoWknZXNS/mMltEljYXU8DZX/O22EQ2d7u1ta+MuLTfwexmv9WBSsW8tl8BI+3 UkLt13N45YiZor9/mOlIkHArobEyUB75HyL3fQ6ffIM0Px3QzGd6Gvniv7wTcSZjd6bi 61MonBaarofnXMrdtiah8BbB71w7sg9sGR4CuMa1yK4FdHqq1ceo40EQal/BP4o4ZN0u uF3wEJgWL8HI9Q1v3MJz20iGJia34erfGb9FLXcS+WryrSjdb4kx9gDHW2qV+R7uFwl9 nfrViXZh2vSLQnBs2BTt6E3MUtTxccz33hKwJNAH/LWah2zrjKOB0+EwU58eOtba9pPP graw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject:reply-to :ironport-sdr:ironport-sdr; bh=l9FTY+q7OZXUTYftet2Za5115vxcl/YVL2/95iPoUW8=; b=WDShOj9kjsn+q+FNaEG0fXQnO5K4UpJ7XtyfpZdtstM1IcjbPQeedq5KIdzDlDRPEg S2KM5h5tJ0vNYLNIHLlNJIcnKzqbtzLmhwZKBPBCG64Zt6uu717YPcyQIkEFnTIxPxVD bJWW1LSg1iriN0JEmPR/d4Ghk1+wr2kHe2z/uAkvW/fjJsgYicJkf+wy2JNdTyj9BX4c 805NeYg7nqhR6rjaw8VsCLByWdUF6Kqmb3B7dR2PVmmyarRwefRJxuWOBTLZOJj7osWj 9xE0isFC+RhPpx6kbrwK0b0Od3NdWMlnp8UyWr1w2OHFl3dZKOYV0djWIGvVykqmXuUM enJg== 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 jr9si8324526ejb.52.2020.05.19.05.31.06; Tue, 19 May 2020 05:31:29 -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 S1728908AbgESM2u (ORCPT + 99 others); Tue, 19 May 2020 08:28:50 -0400 Received: from mga01.intel.com ([192.55.52.88]:4226 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726196AbgESM2t (ORCPT ); Tue, 19 May 2020 08:28:49 -0400 IronPort-SDR: H3ppRK/QbAbfQ7L+897+IIXlODkM9cQt8CYmVQMMZT7fAyTmEwZehKM6LXVToOV5zAiy2UV7e3 I4235JfSvCVw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2020 05:28:49 -0700 IronPort-SDR: 0qz1fTbCA8AzCc+0s2WPO7+ywOJTObWO9Tyx5lUSKxVb8iLa2/PJ1T5lOvRSFLLFZG319eQpSe L/EWM6fGstqw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,410,1583222400"; d="scan'208";a="288941413" Received: from likexu-mobl1.ccr.corp.intel.com (HELO [10.249.171.98]) ([10.249.171.98]) by fmsmga004.fm.intel.com with ESMTP; 19 May 2020 05:28:46 -0700 Reply-To: like.xu@intel.com Subject: Re: [PATCH v11 08/11] KVM: x86/pmu: Emulate LBR feature via guest LBR event To: Peter Zijlstra , Like Xu Cc: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , ak@linux.intel.com, wei.w.wang@intel.com References: <20200514083054.62538-1-like.xu@linux.intel.com> <20200514083054.62538-9-like.xu@linux.intel.com> <20200519110104.GH279861@hirez.programming.kicks-ass.net> From: "Xu, Like" Organization: Intel OTC Message-ID: <6ef6e9d0-d344-b482-4430-0d720b52ea7b@intel.com> Date: Tue, 19 May 2020 20:28:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200519110104.GH279861@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/5/19 19:01, Peter Zijlstra wrote: > On Thu, May 14, 2020 at 04:30:51PM +0800, Like Xu wrote: > >> + struct perf_event_attr attr = { >> + .type = PERF_TYPE_RAW, >> + .size = sizeof(attr), >> + .pinned = true, >> + .exclude_host = true, >> + .config = INTEL_FIXED_VLBR_EVENT, >> + .sample_type = PERF_SAMPLE_BRANCH_STACK, >> + .branch_sample_type = PERF_SAMPLE_BRANCH_CALL_STACK | >> + PERF_SAMPLE_BRANCH_USER, > Maybe order the fields according to how they're declared in the > structure? Sure,  I'll sort the fields in the order of declaration. Thanks. >> + };