Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp236662rwb; Thu, 12 Jan 2023 19:06:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXtSTzLk1z5RHCTJ0fZxhNCBFIAjMEUDbpsZrEwmEQuYxo7vZDB6SZEi7J9k/jYfj+rQh0WG X-Received: by 2002:a17:906:7fc3:b0:7c1:10b8:e6a4 with SMTP id r3-20020a1709067fc300b007c110b8e6a4mr63426929ejs.19.1673579179343; Thu, 12 Jan 2023 19:06:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673579179; cv=none; d=google.com; s=arc-20160816; b=FGbQPPrTR+dy8L5cXN6UQRf/qbpaG1VL+cQpqDuQQlZQM7NnvBzQtf1Kknire+hQx8 HAaEpHg4l37afESzBGc/fXgBtUkKmT90X4tL1LJndpvkb+A618UR8SNK2OWU7TIh2gxl qwlqcdLa5JNjVnnETBnm1P81Ezl2LQcQB+mPz9Nekm29jeLf+Dr+mbRMz9+YaZG5KElI RyevPqknvXq5ZV5CKdkz/sCaDHaEGXX3bsFZAabgmmpA/SuaJJ9Y7EYR4F0KbDcup7tO C/3UGm3AO9t7UpO4ow/lgIvq78eDLl2XlmOzwnbV+rkDN+iP/Jof6HPxDoecwHsTij0h rJ5w== 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:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=CofynZx1r27dyB0mYc9mIIimbwB3fg5Y55pTcdt0s3Q=; b=YltS0Z8OrFwQZY7HWarwKFsVwiKhq66f5XycW8LbZqb+tvzuVrqWUVcFRKTXPfHsN1 Wg6c3AViALkTpLaIcR92dvpC7OEd5bmMgcedWRtxsJP3Ewt91NwoL17qXKvxjZ8tfFdw ux8vc7IKD4uPA/vEW3jiYSGNrosgobWLOubvTplCtFVl5d7O6IaBcWJu933AJmIMsIQ6 GGD4oc4DYcHqpkooa/iz0d0kPlahsDGMXWFlm99O+LtSouIG8+nPu5BZqFxuh0R5sxy9 zB4L9hAaOdqhhQASyeJW6qsuTvYVNqOT/NaCLXSHpcqvTXcsWkZZ8mAzX+iOw5VVo7+J rqrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BmORe151; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt33-20020a1709072da100b008318885e1dcsi21423038ejc.9.2023.01.12.19.06.07; Thu, 12 Jan 2023 19:06:19 -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=@intel.com header.s=Intel header.b=BmORe151; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234573AbjAMCgx (ORCPT + 50 others); Thu, 12 Jan 2023 21:36:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233122AbjAMCgq (ORCPT ); Thu, 12 Jan 2023 21:36:46 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2501641D; Thu, 12 Jan 2023 18:36:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673577405; x=1705113405; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=IqVfhuFqv5rUQhwltDv+2kENmxlK+b+v2ArrLqBrib0=; b=BmORe151gKZDTGtuEEYq3gqt9DzBMQQfStvAhKrYwFABfw9bAxDZfzIz 2elrmBHgFSO8jPutuONRw/X/sTG0J+u4TI0RODH89cxhKZifgE31yRaZn uxnmqkxJwCId5bTvdK9Vt6n498E3h8kv1vLj2eu5IJMz02MQI0EH9HUYa 7sjip1hh1lWCL7qiahRJBpdtWoAMcHyRfGuaYCdlkLVxWZSU1LWrsymJY yJ4ITimIXXu6XKrxoHzHrBBWQ3Qfphm10r1oBWeXpw3rqQV2HUKGNKgfi gGp1VLq5Vk2cAHEva/4JkLd1QNcxmPYtovzpAqL2PyxVir/u/Slcr2j13 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="303594044" X-IronPort-AV: E=Sophos;i="5.97,212,1669104000"; d="scan'208";a="303594044" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 18:36:45 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="986826340" X-IronPort-AV: E=Sophos;i="5.97,212,1669104000"; d="scan'208";a="986826340" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.252.189.78]) ([10.252.189.78]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 18:36:41 -0800 Message-ID: <3b2c162f-7ba2-5e84-2389-a8686c772467@linux.intel.com> Date: Fri, 13 Jan 2023 10:36:37 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Cc: baolu.lu@linux.intel.com, =?UTF-8?Q?Christian_K=c3=b6nig?= , Jason Gunthorpe , Vasant Hegde , "Zhu, Tony" , "linux-pci@vger.kernel.org" , "iommu@lists.linux.dev" , "linux-kernel@vger.kernel.org" , Matt Fagnani Subject: Re: [PATCH v2 1/1] PCI: Add translated request only flag for pci_enable_pasid() Content-Language: en-US To: "Tian, Kevin" , Bjorn Helgaas , "Rodel, Jorg" References: <20230113014409.752405-1-baolu.lu@linux.intel.com> From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE 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 2023/1/13 10:24, Tian, Kevin wrote: >> From: Lu Baolu >> Sent: Friday, January 13, 2023 9:44 AM >> >> One alternative is ATS which lets the device resolve the PASID+addr pair >> before a memory request is made into a routeable TLB address through the >> TA. Those resolved addresses are then cached on the device instead of >> in the IOMMU TLB and the device always sets the translated bit for PASID. >> One example of those devices are AMD graphic devices that always have ACS >> or ATS enabled together with PASID. > > this should be made clear that ATS alone doesn't imply that translated > bit is always set. It's just an optimization so the device may cache > translation for selective requests. Only combining with PRI to > support SVA has such implication. > >> + * @flags: device-specific flags >> + * - PCI_PASID_XLATED_REQ_ONLY: The PCI device only issues PASID >> + * memory requests of translated type. > > this reads like the device even doesn't issue non-PASID requests. > > It is clearer to be "The PCI device always use translated type for all > PASID memory requests". > > Otherwise looks good to me: > > Reviewed-by: Kevin Tian Both make sense to me. It's updated. Thanks a lot! -- Best regards, baolu