Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6609964pxv; Thu, 29 Jul 2021 20:17:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJRnrDdPTUsxTke/KAHbC/oXSXNvhxXKooHM3G9s0n6ODr1jbfUHGQy9/9AES8phfDgtkf X-Received: by 2002:a02:2a07:: with SMTP id w7mr341109jaw.96.1627615058443; Thu, 29 Jul 2021 20:17:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627615058; cv=none; d=google.com; s=arc-20160816; b=nYKF2D87rumcBhuj+CebXK2PhsAOacp5F1e03TKUa1Jej5PBaziRSF88zlFlE9iS0c 0nwaRlDAU4b+B/eAgYMudiENA/dUTnEFLFNMFCziOfLSyc2fyvx+qwNVyn2VxbeF1T2o xVVDO+1fwG7e503NFoF9hfceaLCE8dkejIz6+o3GjxDinpm82n0Skv9Kh+nnnyD/s0gP ZD5JzXVQMypT7J2xMy7VjdnT9nZ9tsD5nDUsYsWybqUmo3aa4BrSrzOyCnOgdR73Irga PUXlyjkAMKpyc+3txOUpQFQZtpN8CNCIGrANVWG394ivYKZikRLpgvbQciSxnJ0FXStK BysA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=XAvlnfi+avGyZ8WyApt7JJ44hndmNa/7czmKLzCGITM=; b=w7gbsTCXj6HIgkiwbhIwy80ct1oHpb9CNcrPe1Q5Kw7L08qErJwFI/14wSkIbCYBnw 99uB5GnA5J/DG7vtB5RF3VBmWNgROHLMSEz/337IDaZLhTIR+swEWGD8FwKK0j/LE0w6 kETvIiSq1LzCmFB2irBZFvIOjr1ITPG1JH20iY7x9b0dkqh0UA1zDefwtEIMdfpM0raf vhANslHgYat9SBiVVNLxF8BjdXbje6FfDk28thkhtccafkxh6dNjS54kT9ThOnVl1lnp wAA6RlBnkJz+9iSYKpR5VwYK0eqtzbQ4g+FCkcuwqKH4wls3K0L92sxcM/Aqr520MwH0 iAmA== 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=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si293507iog.8.2021.07.29.20.17.26; Thu, 29 Jul 2021 20:17:38 -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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234733AbhG3DQS (ORCPT + 99 others); Thu, 29 Jul 2021 23:16:18 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:12333 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229971AbhG3DQO (ORCPT ); Thu, 29 Jul 2021 23:16:14 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4GbXVN0SRnz7ylK; Fri, 30 Jul 2021 11:11:24 +0800 (CST) Received: from dggpeml500013.china.huawei.com (7.185.36.41) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 30 Jul 2021 11:16:09 +0800 Received: from [10.174.187.161] (10.174.187.161) by dggpeml500013.china.huawei.com (7.185.36.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Fri, 30 Jul 2021 11:16:08 +0800 Subject: Re: [PATCH v14 00/11] KVM: x86/pmu: Guest Last Branch Recording Enabling To: , , References: <20210201051039.255478-1-like.xu@linux.intel.com> <6102A1A5.90901@huawei.com> CC: , , , , , , , , , , , , "Fangyi (Eric)" , Xiexiangyou From: Liuxiangdong Message-ID: <61036EEC.4020006@huawei.com> Date: Fri, 30 Jul 2021 11:15:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <6102A1A5.90901@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.187.161] X-ClientProxiedBy: dggeme720-chm.china.huawei.com (10.1.199.116) To dggpeml500013.china.huawei.com (7.185.36.41) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, like. Does it have requirement on CPU if we want to use LBR in Guest? I have tried linux-5.14-rc3 on different CPUs. And I can use lbr on Haswell, Broadwell, skylake and icelake, but I cannot use lbr on IvyBridge. Thanks! On 2021/7/29 20:40, Liuxiangdong wrote: > Hi, like. > > This patch set has been merged in 5.12 kernel tree so we can use LBR > in Guest. > Does it have requirement on CPU? > I can use lbr in guest on skylake and icelake, but cannot on IvyBridge. > > I can see lbr formats(000011b) in perf_capabilities msr(0x345), but > there is still > error when I try. > > $ perf record -b > Error: > cycles: PMU Hardware doesn't support sampling/overflow-interrupts. Try > 'perf stat' > > Host CPU: > Architecture: x86_64 > CPU op-mode(s): 32-bit, 64-bit > Byte Order: Little Endian > Address sizes: 46 bits physical, 48 bits virtual > CPU(s): 24 > On-line CPU(s) list: 0-23 > Thread(s) per core: 2 > Core(s) per socket: 6 > Socket(s): 2 > NUMA node(s): 2 > Vendor ID: GenuineIntel > CPU family: 6 > Model: 62 > Model name: Intel(R) Xeon(R) CPU E5-2620 v2 @ > 2.10GHz > Stepping: 4 > > > Thanks! > Xiangdong Liu