Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2340018rwa; Mon, 22 Aug 2022 06:17:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR46SmFkp3Ql2q7ofQSMBVE9wTxP8Gvard8vPi8q9QwOrHZI/1dMeEtDOnqdR/MLSuOQeMie X-Received: by 2002:aa7:9731:0:b0:536:7b04:acb6 with SMTP id k17-20020aa79731000000b005367b04acb6mr7337122pfg.43.1661174277320; Mon, 22 Aug 2022 06:17:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661174277; cv=pass; d=google.com; s=arc-20160816; b=d4gG2KsmmI8y9y5qQx8yOIlf6IX4pnEJp0UT3PX+kyHNaxFUoLRjDWU5ZW+UEhKDNS ZCMHIlTwymIVMwfJgAVhx90M9XaPeZJedBrPafQ1+bR0SAdiBKdfAbWX/yE/FHyydE2t CGaqmLrrvcLkyJkm41jAUKRwVpU/quuo1d+IMx3n/j4qisFey3Ehl/dEPe4rRl1F/AnZ jxAZgxKkbPlHWIGQW3E7cZ0waEmbD7pOwKtdNWDlNlUTcsun0zevdsC1UlJYioyLHExb 1Mpo33Q63cyUjMR+qG1UPIEw2Net9c7kQIK2hDl7E4mApwnekTQr3p9/US2sIZF4d3xK mQUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=yTVtNZG6iDcTwU33RBGkkRMnmA3hG/11ANVaNFKEa7Y=; b=VpWqAY5pyjJ1buHQ0jS6MjyJk6od2Sl3zJxAlDrsy6UwC9hJXUxfp9kkdO4bex1uMV W1oU/tbLzVbf+hsAqq6bEyEJE0V+n23n7Z0M6GzbqI4rNXHj2en0VxrQM0d7/NXTrvE8 6GBfBsqKX3mLpAhd91W0KhOsmhH6aC+XLQh62fjhZxklrH0ZpQE2TyjWj5rwsmiRtrlU H+gdoqlRMz5mbXQPxU6PiaJpUTDcR4un788yylY4q3CY7mGVGN43i/on7wK/SCKuqctS 7AlaCY4kjJNeNWy0SsK+3CTWBkKB8h5Cub0KYrlqj4Diz/mSR6tsHQdl6oxMo66E3GYJ 7xhQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=XuBv9Gty; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l11-20020a17090a598b00b001f4d176aa8bsi13950304pji.68.2022.08.22.06.17.46; Mon, 22 Aug 2022 06:17:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=XuBv9Gty; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235207AbiHVMwv (ORCPT + 99 others); Mon, 22 Aug 2022 08:52:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235143AbiHVMwn (ORCPT ); Mon, 22 Aug 2022 08:52:43 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2088.outbound.protection.outlook.com [40.107.223.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 761142E9CA; Mon, 22 Aug 2022 05:52:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MSeWCHq/H5Z1UfabfSOoxWrtdG8BwcMEddkbjGExnNLirZNkQWA+c1Emt+vkvziLFIqj5EPBVVEBEZiyxP3bv9t6+iyNQ302FgU1RhzJNB+RRRdMmx7oA6LdIbGwdf8nTVnBgec/x6Eon7A2E8E9TqUYKR3HZXmg7CoW29/dKer728p+hqufsGeOnxu+N7el6WMqNKpwLnSlIpn3kRgVuk+C0xSXSaGMyyUsjRZ4HC1KOlvZdAjp4RZ3S4o+WgCkeZf07tCl4u9wTWGQaLhSS6qb2Kvprll+xIZw+joMNfuPnlBwAeOhhpAtYLdVgCq3oNK1ptDNXpDYXMEAArXhNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yTVtNZG6iDcTwU33RBGkkRMnmA3hG/11ANVaNFKEa7Y=; b=V+XQmLT9RtoDkzV/m+e6PAgU0qSLLcijmhexBtQCYcg5YVrzB5tyKVy0sE6ZCtGP1oyJ4lfbzUqn1v4Yn2hbrYsUgf5UQMMO7Td+TfONuliYVcVNcE3UaUjhLERg/+1gAcZUa1K6ESMD5ck9SkAIjnV17T/6Y1J/mrcXZpz+78LgAd15aqbdQRdVEtMgQieYi/pSA/MRvyqeO/od/xMHjw8gMiL27CHqbQbrchxoy5zmSYXb5wLcr2z47B1h+Lz1cl4GA5UwdXy0kII1YpHsNGo8P3/7xXpNlU7VGFM6RubpKof7y+jkfwikS6264wqOEb7zR76SOaw5K7g16A8SZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yTVtNZG6iDcTwU33RBGkkRMnmA3hG/11ANVaNFKEa7Y=; b=XuBv9Gty/rnCRQu401mJwoEx4DEgtD3GJI6+tBXkBY0DDOeKUurK4bNKUtF4uaBlwfFbrbpR86BmGiP+crE7ZXF72rUHbzouCu0NVJDswhjvsGgflkKcAsJrRyPTfVMIRDvClvZnu61Kv+XpA4BFhVu5SqtvRJQ/DTKAb5Q75qQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from PH7PR12MB5712.namprd12.prod.outlook.com (2603:10b6:510:1e3::13) by SJ1PR12MB6050.namprd12.prod.outlook.com (2603:10b6:a03:48b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.22; Mon, 22 Aug 2022 12:52:40 +0000 Received: from PH7PR12MB5712.namprd12.prod.outlook.com ([fe80::e459:32ff:cdfc:fc8b]) by PH7PR12MB5712.namprd12.prod.outlook.com ([fe80::e459:32ff:cdfc:fc8b%9]) with mapi id 15.20.5546.022; Mon, 22 Aug 2022 12:52:40 +0000 Message-ID: <06e9a357-422d-1870-ae72-18e74964caf3@amd.com> Date: Mon, 22 Aug 2022 18:22:25 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 04/13] x86/cpufeatures: Add LbrExtV2 feature bit Content-Language: en-US To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, x86@kernel.org, bp@alien8.de, acme@kernel.org, namhyung@kernel.org, jolsa@kernel.org, tglx@linutronix.de, mingo@redhat.com, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, dave.hansen@linux.intel.com, like.xu.linux@gmail.com, Stephane Eranian , ananth.narayan@amd.com, ravi.bangoria@amd.com, santosh.shukla@amd.com References: <172d2b0df39306ed77221c45ee1aa62e8ae0548d.1660211399.git.sandipan.das@amd.com> From: Sandipan Das In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN0PR01CA0038.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:49::7) To PH7PR12MB5712.namprd12.prod.outlook.com (2603:10b6:510:1e3::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e8962ffd-e9fb-4ac2-c6ea-08da843d326e X-MS-TrafficTypeDiagnostic: SJ1PR12MB6050:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mhe50/MpAAcxe4wJFOSfqL6tCXNomdJqFDfRfkaD/G5Ffp5qu+nlpEPBp4HRxzmB7T1BUQ/sfPujS8TKGngGiI4w6aPpmsz1qnIuWyY8mCM+OHdqazSzhDDZlk77R7bL8EwernovEmQm9aQpJ3zes3kMefVUAkT7xxrL9XYxeSGhDxPjPnP4WK7rF+i5vtYu4CADCkr/eW8YMjwBdeLALLhr003wjpU8ozK4rvdqdXUb6AInugMtteFYJhh1F9v2jbqj8Y3VNrNEcVWWl06TZQCQkOAVc6n6ed0PLlqOR1TXCMxHdYPRm0juuhquxKXacm/xjmUQZVZPewjPEOFz4J5tiWzRsOutfGW1/+FmV/gcSF6PmppADoxs5sS0uss1Iew2tV0+paSH9akTK+AWFLBBWlN03JA//k2yPr+gLRok09mMKxcf/VUUl0Wu+itFkv0S1qER0DmBia3Cn10NG/T4x9AHE/YKIqrdvqLMbq8XWoT23wOQyg8KQPxN/bSuKU9q2vTiQ8FC6XYj+S7zYOsuJ80Xkda6v18Jzy5my9WYgswjd4Dd27wekYt5h0hCfSC6WSJhDnq8hKgCVeaPU5+1TOZ0CxnG03Zr+klr4kc+WIL166k8FX5NvnB+M8xpH782lUorPFTRi4xlpCvet4eZYPNd13tutVPasEcYYUqdzBOBEMBVTsUClMWKwCn2d0HP1hcUcFAZZhokvaHyXlJLtEygXwCcU0VMZ6GCHRQWMWUon/vLyq+A38vh4zNwQt6LtEyAuOM6f8jSneW9iQToL6W7Y7gRd1hQxgB4yO0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR12MB5712.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(39860400002)(346002)(396003)(366004)(376002)(136003)(66946007)(66556008)(8676002)(66476007)(8936002)(4326008)(6916009)(316002)(186003)(31686004)(44832011)(7416002)(5660300002)(36756003)(2906002)(41300700001)(53546011)(2616005)(6666004)(86362001)(6512007)(26005)(31696002)(83380400001)(6486002)(478600001)(6506007)(38100700002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?a3Y2NmpudEUySkQ3Y1hlaUEvdlRTSnNPTUFmN09rZUs5RlZCcUdOL0dlTXRu?= =?utf-8?B?VVBoZGlCVXZjMGJza1M2UEFGSnJScG1CVmFCZnRPSTV1UUg0T05VYWsyK0hB?= =?utf-8?B?b1FjUjhZclFGNGUzZG1FWkFuQVZKRHhqeFU1SFRKY0toTXVhWU5neVpXVFVC?= =?utf-8?B?NTlJR0VMcy8xVXFlSzB2NWhFczVBV3hwdzFLblVIT0x5Q0RRc0xsMnMyeEVt?= =?utf-8?B?M1I4b09VZUNBcnd4MzBlR21vMGsyUkNrV1lzQkY3RmZZTHdUQ21VdE5Pb1Fh?= =?utf-8?B?d2lSNE44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DJISEhy?= =?utf-8?Q?JT/FOz8J9eWxPHD1QCjbJoWJK?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8962ffd-e9fb-4ac2-c6ea-08da843d326e X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB5712.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2022 12:52:40.5037 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3ieDpJpXzP3qrM0jhNxz4As6UoJgluNb/A+bnAVkKjGeANb3p/PANuDhci0h5XIr1QKARvk5nx130MCDiIh6Cw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6050 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On 8/22/2022 2:35 PM, Peter Zijlstra wrote: > On Mon, Aug 15, 2022 at 12:42:23PM -0700, Stephane Eranian wrote: >> Hi, >> >> On Mon, Aug 15, 2022 at 4:27 AM Peter Zijlstra wrote: >>> >>> On Thu, Aug 11, 2022 at 05:59:52PM +0530, Sandipan Das wrote: >>>> CPUID leaf 0x80000022 i.e. ExtPerfMonAndDbg advertises some new performance >>>> monitoring features for AMD processors. >>>> >>>> Bit 1 of EAX indicates support for Last Branch Record Extension Version 2 >>>> (LbrExtV2) features. If found to be set during PMU initialization, the EBX >>>> bits of the same leaf can be used to determine the number of available LBR >>>> entries. >>>> >>>> For better utilization of feature words, LbrExtV2 is added as a scattered >>>> feature bit. >>>> >>>> Signed-off-by: Sandipan Das >>>> --- >>>> arch/x86/include/asm/cpufeatures.h | 2 +- >>>> arch/x86/kernel/cpu/scattered.c | 1 + >>>> 2 files changed, 2 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h >>>> index 393f2bbb5e3a..e3fa476a24b0 100644 >>>> --- a/arch/x86/include/asm/cpufeatures.h >>>> +++ b/arch/x86/include/asm/cpufeatures.h >>>> @@ -96,7 +96,7 @@ >>>> #define X86_FEATURE_SYSCALL32 ( 3*32+14) /* "" syscall in IA32 userspace */ >>>> #define X86_FEATURE_SYSENTER32 ( 3*32+15) /* "" sysenter in IA32 userspace */ >>>> #define X86_FEATURE_REP_GOOD ( 3*32+16) /* REP microcode works well */ >>>> -/* FREE! ( 3*32+17) */ >>>> +#define X86_FEATURE_LBREXT_V2 ( 3*32+17) /* AMD Last Branch Record Extension Version 2 */ >>>> #define X86_FEATURE_LFENCE_RDTSC ( 3*32+18) /* "" LFENCE synchronizes RDTSC */ >>>> #define X86_FEATURE_ACC_POWER ( 3*32+19) /* AMD Accumulated Power Mechanism */ >>>> #define X86_FEATURE_NOPL ( 3*32+20) /* The NOPL (0F 1F) instructions */ >>>> diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c >>>> index dbaa8326d6f2..6be46dffddbf 100644 >>>> --- a/arch/x86/kernel/cpu/scattered.c >>>> +++ b/arch/x86/kernel/cpu/scattered.c >>>> @@ -44,6 +44,7 @@ static const struct cpuid_bit cpuid_bits[] = { >>>> { X86_FEATURE_PROC_FEEDBACK, CPUID_EDX, 11, 0x80000007, 0 }, >>>> { X86_FEATURE_MBA, CPUID_EBX, 6, 0x80000008, 0 }, >>>> { X86_FEATURE_PERFMON_V2, CPUID_EAX, 0, 0x80000022, 0 }, >>>> + { X86_FEATURE_LBREXT_V2, CPUID_EAX, 1, 0x80000022, 0 }, >>>> { 0, 0, 0, 0, 0 } >>>> }; >>> >>> Would LBR_V2 work at all? It being a new version already seems to imply >>> extention, no? Then again, I suppose there's an argument to be had for >>> avoiding confusion vs the Intel LBR thing.. Couldn't you have called >>> this BRS_V2 :-) >>> >> I believe it is called v2 because there was already a LBR in previous >> generations, however it > > That's not the question; It's currently called LBREXT_V2, which is a bit > of a shit name. Then again LBR_V2 is too because AMD and Intel LBR are > quite different. So in that respect BRS_V2 would be an ever so much > better name. AMD LbrExtV2 is similar to Intel LBR. Unlike BRS, LbrExtV2 does not rely on interrupt holding. The branch records are "frozen" at the time of counter overflow. - Sandipan