Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6335912rwb; Mon, 5 Dec 2022 10:49:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf5TLi21KNqhanDNJAAzjaWWvBjGdVlvUg1QJ2PAy6zozeQpeWYi3v/ZMN3CxWN3jntyayQ+ X-Received: by 2002:a17:90b:3941:b0:215:db2e:bb17 with SMTP id oe1-20020a17090b394100b00215db2ebb17mr90669922pjb.166.1670266166882; Mon, 05 Dec 2022 10:49:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670266166; cv=pass; d=google.com; s=arc-20160816; b=H4XG8VSxnDMinUFXaT0lC4RoQ2wqJpDVESHJ/ELXYzreG9g77iOWOStGRdf8ZmeACz MggzB+6ICKFeGm8fW37c+xkd4Sz9bnEvHghPSYSo+KIYS8KSvZy0URWA8O+Pxc/ajf3M zkeh/ivTTKmCts+R519BNJJzpzCIfCuhojYp1Xh0DWfF6CI9Cg2Bmu1eE7Tr+n6hCHgv rkRR+a/Wjzu5vFDMd6rzxGXzfSADYyBjl/F5n5qjqzbxtuca0bgeZlxu+6p3QxgPHkIE W+xPbeEv0x5+Ry9uHyBnijNUVftKefwUcegypiHjVUOyPgQKAYXIDycduWI4GNgtapcS cR3g== 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:subject:from:references:cc:to:content-language :user-agent:date:message-id:dkim-signature; bh=PD/KHhXH4XHKeOEzm3mxy/2noA61jUBvtB4ZgzlvAdE=; b=AUOHADaUS1N+k6xCQtPSM8H5kTRJrW8Uuzl2JeYIz1meNW4M7VOzlDZGI9LgtTMvGq HZecSGcsqV1xDdNxAHBO88AsGbut1Bqc2ML6UVW4vpDh/LlTztdasFUnRuimqkmwonGy Kkgil4JQxOdpkArxqpd0+G1Q2M2hs0bUbDts/08BvH5VEz5MpIFkJ64i1u5z7CFs/7W2 R1i3aO0GMV2UI1+/FaYWUoMe9qr3dOs7zmeNcFn+H1EIlZeNLuGVqGAyDNT6PqKsU70o S0XAkq7d9p02SrwEkzPq0YLBTcd9U/zRH6JxBDNhZEO8oYYMKeQR3ZLxGS5VQAFAn/w3 FpvA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=vTlh5CjW; 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 j4-20020a170903028400b00177e5c1d5d0si14099256plr.347.2022.12.05.10.49.16; Mon, 05 Dec 2022 10:49:26 -0800 (PST) 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=vTlh5CjW; 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 S230084AbiLERcM (ORCPT + 81 others); Mon, 5 Dec 2022 12:32:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230381AbiLERcK (ORCPT ); Mon, 5 Dec 2022 12:32:10 -0500 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2053.outbound.protection.outlook.com [40.107.243.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1141F21E22; Mon, 5 Dec 2022 09:32:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B+GvETJoeLU6wpDal6GGfNEzBaXCicufWyH6AOmJ8wPAmIGnv+LfTWCUXYrTLRENx3IRYw45JnWhrFL96S9yzEfM4qDsbnhjGl/tByVhMKRibt/TecKy7/Q5pYnJPYF/n9AkrL4m95gxCJYm2C4eH0xCFFApU1v8xQIIcwiNzTSBNsGPp9iv1AndGtwIZq55+Y2WTKqMH1KSrtFnLAOQVdk2s8IlBrZtZ1+MQgAfjwsGrofb0M/87l22foK1J2RUWR/M0uVxIAVB+C04K9jXsHeZiQfV4Q/k9iLg17XFbQ0jC1i0ryFEw9/o3mvs3dY5optOPpzQxkOPrFFtrX1K6Q== 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=PD/KHhXH4XHKeOEzm3mxy/2noA61jUBvtB4ZgzlvAdE=; b=mZj943XZKURJ198EWFsqgSVXyeRPYN/yJcBTi6zJckEI2fJBDbWzBr3ktkBSuak+Klpe6D+kW6G77RmbFlMaylRk5QbgLaA7AtiF4tOvHtWWDm6kJIgQyK7aF7jnG27s2Lo2z4lwMueOKGUHQ6H5OcDgsvrYn+xtHRVNCZtlcmOfjo3SUInnzk8xX5QdcTsPuETPhZPVLK+0KoQ1b8dXpkO4o2MPDWlyPj+a5AZiEeL1ZI6P2EZn7Q0h6VeO29jkAiFSfx6EYeb81+dnQ3YT6uuwWX6PSkymAHkw58rx/QwFlI1k9synkr3HOQmOJoxbt5BoQvaQFvfDcf64hGWJLA== 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=PD/KHhXH4XHKeOEzm3mxy/2noA61jUBvtB4ZgzlvAdE=; b=vTlh5CjWez7viOpVuVlwtshMfYetUULvLPgjQK61XJNnS1qM549QKqt7x+ITsorpLkNgel77Ua3ycYeo40TlIpEpYy4eEg6C6f3EWg3VhyNidS+zKwrS0lkEfjc3gwhOLzcR+d9RIqRZTipRPjcL9gUegxLI2eR+rptpf9wsHQQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DS7PR12MB6263.namprd12.prod.outlook.com (2603:10b6:8:95::17) by IA1PR12MB6627.namprd12.prod.outlook.com (2603:10b6:208:3a1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.13; Mon, 5 Dec 2022 17:32:05 +0000 Received: from DS7PR12MB6263.namprd12.prod.outlook.com ([fe80::818b:be51:fc53:5adc]) by DS7PR12MB6263.namprd12.prod.outlook.com ([fe80::818b:be51:fc53:5adc%5]) with mapi id 15.20.5880.013; Mon, 5 Dec 2022 17:32:05 +0000 Message-ID: <53393726-5a8a-1a13-c620-32c65872278c@amd.com> Date: Mon, 5 Dec 2022 11:32:01 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US To: Borislav Petkov Cc: x86@kernel.org, Babu Moger , Borislav Petkov , Boris Ostrovsky , Dave Hansen , "H. Peter Anvin" , Ingo Molnar , Joao Martins , Jonathan Corbet , Konrad Rzeszutek Wilk , Paolo Bonzini , Sean Christopherson , Thomas Gleixner , David Woodhouse , Greg Kroah-Hartman , Juergen Gross , Peter Zijlstra , Tony Luck , Tom Lendacky , Alexey Kardashevskiy , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221201015003.295769-1-kim.phillips@amd.com> <20221201015003.295769-2-kim.phillips@amd.com> From: Kim Phillips Subject: Re: [PATCH v4 1/7] x86/cpu: Define a scattered No Nested Data Breakpoints feature bit In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MN2PR01CA0011.prod.exchangelabs.com (2603:10b6:208:10c::24) To DS7PR12MB6263.namprd12.prod.outlook.com (2603:10b6:8:95::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB6263:EE_|IA1PR12MB6627:EE_ X-MS-Office365-Filtering-Correlation-Id: da76b207-1107-4653-6b7a-08dad6e6a0c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GwH99tcYWdT4qbjWoDbmwi2fnCJkEZb1ctxONEMd4uZVDXPwA15VYutS45J0ixCGKs3b1Io/2kw4znMIn2yIDfIPow5n2bk50U4QG8r8De14xJBPtEhzJ+d/qfyrFDLWq0Pmhwcs2+V2Y1cEg1cVR/W40ga2UqaMzzrVqCFLZToalc8hK2f2Q6tEJCUD2d6vvI/ddXXjG3Z3J7C6qDx/z5W9EybbpOoWvbOVq9wdA8IvP5ge5XFVQCbnOBqcIYMpTx7c5hlFQyv1Vt7f6uE4Bk/85rWzJ64C8IUQA8m9j1eKESu718QksYkSp8K3Q4uU+o7LZqlYgDwTFe67PLmhBgHDKtW+n4ssI0HqTxg3UctnmKos0Xt5e0XdPzwYA8kn/ve+XdOoFmM1L9olzm76CqNpIWFkfA5Bj2Lx2RHRF9o7SBS7O+Z929A91BCj+9b7Hr8u6m0he3FCsfatB3DanxHn1fWJQO5kNyu3nysIk3G5xXsi6QTAacBRfrw/crtgK0JldvU/dRvRTmAVtL7L35VI8H2g3b1JMCXB6uKppniTSStMyZi9JZol3VXp/DlgeWg112TUsXkWYXZ137CJS4E4v17YNzuJELWT38051cUV6oMQuNfeNDvQ06+ZSv1ofld98IREFqxYTCsRPJ8Sj8fDLCametZuFtIBC1/fjj4Xf7V64iyscidU/FJUX2Oq45DZppK3lF+D6OiDdJQkCWWqS8DxuGGB9TxfHTGhnpk8P/PUr8Qym705x7A24yoU X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB6263.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(136003)(396003)(346002)(376002)(39860400002)(451199015)(36756003)(86362001)(31696002)(966005)(53546011)(478600001)(6486002)(6506007)(66556008)(6512007)(4326008)(7416002)(8936002)(41300700001)(5660300002)(6666004)(8676002)(54906003)(316002)(2906002)(6916009)(44832011)(66476007)(66946007)(26005)(2616005)(38100700002)(186003)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RjRwUjNMTkhqRkNIRjNMc1JyakVPcEJuQnhiUTZjTWtzRVUvUWVpZzZ4bDRj?= =?utf-8?B?SEVmNnNLYjNXVnFaM2pRVVhUT2hNNERTUFZQc1ptWGsxQmp5aVkxam45UHJC?= =?utf-8?B?ZTIySzhCWmdHTVBOaGdVUTFTQTdrMWVsZENJZmgwRG1jL2Y4MFNiQi91UHFl?= =?utf-8?B?cUdDdisyQmsrMWlMTVpib2ZxOThPYVoyWGlMM0psd3JTOG16OGxJTmM1V2pM?= =?utf-8?B?cVYzTFNXZ3JNNWRzYlZhczdQR0J0MXgraUhYMmpqb3c1WDlabk9QVGVmQmpX?= =?utf-8?B?WlV4QlVnTmQrcDlBUFZnc0IxL0V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dR6HA1bzT5PeyL5siQu1kXcaJ?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: da76b207-1107-4653-6b7a-08dad6e6a0c6 X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB6263.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2022 17:32:05.6557 (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: MJHViIdnbou6TBDV55RXDQAst7oxGAvU7tEt4evjzMRtKo1naPkuPblXdE9iX+6ygz/Bfd5SUKp1N9V2XsrUrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6627 X-Spam-Status: No, score=-2.4 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 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 On 12/5/22 4:23 AM, Borislav Petkov wrote: > On Wed, Nov 30, 2022 at 07:49:57PM -0600, Kim Phillips wrote: >> +++ b/arch/x86/include/asm/cpufeatures.h >> @@ -307,6 +307,7 @@ >> #define X86_FEATURE_SGX_EDECCSSA (11*32+18) /* "" SGX EDECCSSA user leaf function */ >> #define X86_FEATURE_CALL_DEPTH (11*32+19) /* "" Call depth tracking for RSB stuffing */ >> #define X86_FEATURE_MSR_TSX_CTRL (11*32+20) /* "" MSR IA32_TSX_CTRL (Intel) implemented */ >> +#define X86_FEATURE_NO_NESTED_DATA_BP (11*32+21) /* "" AMD No Nested Data Breakpoints */ > > Right, what is the use of this bit in a KVM guest? Running perf tool in > a guest would use that bit how? This is starting to get off-topic. Propagating that bit to the guest was originally added by: commit 58b3d12c0a860cda34ed9d2378078ea5134e6812 Author: Paolo Bonzini Date: Thu Oct 28 13:26:38 2021 -0400 KVM: x86: add support for CPUID leaf 0x80000021 In the future, it will be used by: https://lore.kernel.org/lkml/20221201021948.9259-1-aik@amd.com/ to allow hardware swapping of debug registers. If it can't be used in the nested VM case, I can remove the guest propagation code for it from PATCH 4/7 with a Fixes: for the above commit, but this 1/7 PATCH will remain. Thanks, Kim