Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8938434rwd; Wed, 21 Jun 2023 00:26:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4aeMz1tGTbQYc1ylzyxb+wtQAez1LrQZjkmbleyTZKk1Y6eWLWPdI+RWAqlihOvyJZ4Qxz X-Received: by 2002:a05:6359:2e99:b0:12b:d4a0:fab3 with SMTP id rp25-20020a0563592e9900b0012bd4a0fab3mr7827735rwb.3.1687332375446; Wed, 21 Jun 2023 00:26:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687332375; cv=none; d=google.com; s=arc-20160816; b=syVMk3+wopphSn4uKTavy3zHYwBSSMTHyPotrU2p5dF+3mMqnxcm2MCthNtSJWznf2 WuIToFNQsa8vTOgu1KFZNbIHJH+6r8h8lUi6ChJU1EUBk8YVnAs5RIUBOUQCT2oOfS3G fUiI2vgbiuap0tA3spsWifYDtuENiWvVMPOyBmPfHhD4EtIpRGO4SQHg7V+mfywDgJfL jPIWmSlYFEaRCvMceQ+pwErFFneY1loIX2W+da7JqM5mPOUBj93TwSQgyoqbzKjY93yJ xW24F6muAzbBoGjN6WMsgBb7MxzctXY5zQMzZGclZeV7Nd0KnvXbOJ52ELUBIzKpooR3 nkAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Dzq6FDA3ecknmPDLnA2aLzg5if4+80qt8idC4aAgALE=; b=NAE52S1zhNuB0NmwnkSwe7wz/dT3+ABeekKwHErkFrZZAGZfW12/771WwFBy6Ip4Q9 wL8BdOOnvYljpEyd79ahGSAdvj/Bz6/AODhZJrNBcjj3IbJP/TD452xcqvH0+z+riRz4 d7ZmqjhTwEmLjO8tdiEqdNmaQdPR+tUkfahdNzF6sRu7/kpFSZ+yuVjBV+Su8ztGyK3z TcKT5Gf/TwjetEcclLYZGRxxpzA2/xb6iAR+1kTnJ25VwMfXSDW4zoF6nH+EwSvddKBI jlpPLwxSSo4+MqLvGZJbhaGu2lWiA9/PTRcxXMPqJvjlh4gl5TUAZXNnSuU4QJ+dPl2H y+nQ== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ct26-20020a056a000f9a00b0064d28b68d8fsi3739583pfb.94.2023.06.21.00.26.03; Wed, 21 Jun 2023 00:26:15 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231172AbjFUHNF (ORCPT + 99 others); Wed, 21 Jun 2023 03:13:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229970AbjFUHND (ORCPT ); Wed, 21 Jun 2023 03:13:03 -0400 Received: from bmailout3.hostsharing.net (bmailout3.hostsharing.net [176.9.242.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5725110D2; Wed, 21 Jun 2023 00:13:01 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 62097100FC16D; Wed, 21 Jun 2023 09:12:59 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 2ECED110A0; Wed, 21 Jun 2023 09:12:59 +0200 (CEST) Date: Wed, 21 Jun 2023 09:12:59 +0200 From: Lukas Wunner To: Smita Koralahalli Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , oohall@gmail.com, Mahesh J Salgaonkar , Kuppuswamy Sathyanarayanan , Yazen Ghannam , Fontenot Nathan Subject: Re: [PATCH v2 2/2] PCI: pciehp: Clear the optional capabilities in DEVCTL2 on a hot-plug Message-ID: <20230621071259.GA2028@wunner.de> References: <20230418210526.36514-1-Smita.KoralahalliChannabasappa@amd.com> <20230418210526.36514-3-Smita.KoralahalliChannabasappa@amd.com> <20230511111902.GA10720@wunner.de> <20230616182409.GA8894@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, 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 On Fri, Jun 16, 2023 at 04:34:27PM -0700, Smita Koralahalli wrote: > On 6/16/2023 11:24 AM, Lukas Wunner wrote: > > On Mon, May 22, 2023 at 03:23:31PM -0700, Smita Koralahalli wrote: > > > On 5/11/2023 4:19 AM, Lukas Wunner wrote: > > > > On Tue, Apr 18, 2023 at 09:05:26PM +0000, Smita Koralahalli wrote: > > > Some couple of ways we think could be: > > > [1] Check if these bits are enabled by Platform at boot time, clear them > > > only it is set during hotplug flow. > > > [2] Clear them unconditionally as I did.. > > > [3] Enable 10-bits tags in Linux when a device is probed just like how > > > we do for ARI.. > > > > > > Similarly call pci_enable_atomic_ops_to_root() during a hot add.. > > > > Personally I'm fine with option [2]. If you or Bjorn prefer option [3], > > I'm fine with that as well. > > Looking forward for Bjorn comments! You may want to consider first doing [2], i.e. clear the DevCtl2 bits on hot removal, and then in a separate step do [3], i.e. add support for enabling 10 bit tags and atomic ops in the kernel. Having that would certainly be useful, but it's more complex than just clearing the DevCtl2 bits on unplug. So you may want to do the latter as a stop-gap. Thanks, Lukas