From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55E98C3A589 for ; Thu, 15 Aug 2019 17:35:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 305622064A for ; Thu, 15 Aug 2019 17:35:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732417AbfHORfT (ORCPT ); Thu, 15 Aug 2019 13:35:19 -0400 Received: from mga03.intel.com ([134.134.136.65]:6871 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbfHORfS (ORCPT ); Thu, 15 Aug 2019 13:35:18 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2019 10:34:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,389,1559545200"; d="scan'208";a="376449664" Received: from skuppusw-desk.jf.intel.com (HELO skuppusw-desk.amr.corp.intel.com) ([10.54.74.33]) by fmsmga005.fm.intel.com with ESMTP; 15 Aug 2019 10:34:19 -0700 Date: Thu, 15 Aug 2019 10:31:34 -0700 From: Kuppuswamy Sathyanarayanan To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ashok.raj@intel.com, keith.busch@intel.com Subject: Re: [PATCH v5 3/7] PCI/ATS: Initialize PASID in pci_ats_init() Message-ID: <20190815173134.GC139211@skuppusw-desk.amr.corp.intel.com> Reply-To: sathyanarayanan.kuppuswamy@linux.intel.com References: <5edb0209f7657e0706d4e5305ea0087873603daf.1564702313.git.sathyanarayanan.kuppuswamy@linux.intel.com> <20190815045659.GF253360@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190815045659.GF253360@google.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 14, 2019 at 11:56:59PM -0500, Bjorn Helgaas wrote: > On Thu, Aug 01, 2019 at 05:06:00PM -0700, sathyanarayanan.kuppuswamy@linux.intel.com wrote: > > From: Kuppuswamy Sathyanarayanan > > > > Currently, PASID Capability checks are repeated across all PASID API's. > > Instead, cache the capability check result in pci_pasid_init() and use > > it in other PASID API's. Also, since PASID is a shared resource between > > PF/VF, initialize PASID features with default values in pci_pasid_init(). > > > > Signed-off-by: Kuppuswamy Sathyanarayanan > > > + * TODO: Since PASID is a shared resource between PF/VF, don't update > > + * PASID features in the same API as a per device feature. > > This comment is slightly misleading (at least, it misled *me* :)) > because it hints that PASID might be specific to SR-IOV. But I don't > think that's true, so if you keep a comment like this, please reword > it along the lines of "for SR-IOV devices, the PF's PASID is shared > between the PF and all VFs" so it leaves open the possibility of > non-SR-IOV devices using PASID as well. Ok. I will fix it in next version. > > Bjorn -- -- Sathyanarayanan Kuppuswamy Linux kernel developer