Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp274972imn; Wed, 27 Jul 2022 23:30:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v8MTK6X/pcI9Ex8EQkf/PZWNGiG0mVHzKBT9MtWxNnq5DQtohMgtLH18QeyAfcQdY/JsU1 X-Received: by 2002:a17:902:b60d:b0:16b:e832:7295 with SMTP id b13-20020a170902b60d00b0016be8327295mr24671468pls.144.1658989826437; Wed, 27 Jul 2022 23:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658989826; cv=none; d=google.com; s=arc-20160816; b=OWmiFEk/iyVVYHNHhoO4wtVF4UnlDrD6gIwjWQ82S6qBij8e2drFwz1aG092dAPQ10 XL7VTSNP0ejW46269NiyBtZEye2tmZrQiT7H863Psp4GzF/+bCs876uf+d1VAYxApnA6 FJyURmnuL8YqFuviuB0/PmoJVBXfgVjbnK+4HBGO3X0x/Woae2tCyzEnX+L6a/vzpcsq 0z+Beg09+9+eM2gqPp1UzyBnZ/P5sDu5aYwzhj664RC14xH/KpxScYniA7Lxm9qth0zr 7o0V8dpsuMJp3WNQ4mlJLgwd1Wb8BuAoZinvhn2DcagFjU62DS9qOoz2cgzHpOSucMf3 6kZw== 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:subject :from:references:to:content-language:cc:user-agent:mime-version:date :message-id:dkim-signature; bh=GFyw22OsYKU+seYfktYdJZhsKVwPMuCNeZytY+4yRNU=; b=Wap2A0dghfE4zF6mvJcOS/G87+J1k/n6v3qqDw6SkK4KDCADJaoYnHz9q/dgrb2YZf JnKkFKPv2LcdrbNa4ZeQLXw7Xosn3XtnTgRdyHkcReo/oWsKuik70YHCiI0/udY+PJIn SaTF+zpszjSh6VZ36Ia4BH7cNPw7BJtgw7dzejy2XbERs0Vru4JMXvyX1MsLVDtfcPN6 dyC+u0Et+zFptW2GQ6iuSmEkWf+/vIQZ6JaAjqS9m+70wnkkAGjUouk8V0aAT32sVNgN rPB0jvoYjlkYjkMhBih/XaRBJbmUvclJmOwPXTd5ddeajy9+UPO4+qXRh3LIKzsxJPs0 De/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QSGNlIJh; 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 y18-20020a17090322d200b0016d5fba1b26si249109plg.98.2022.07.27.23.30.11; Wed, 27 Jul 2022 23:30:26 -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=@intel.com header.s=Intel header.b=QSGNlIJh; 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 S232220AbiG1G1k (ORCPT + 99 others); Thu, 28 Jul 2022 02:27:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbiG1G1i (ORCPT ); Thu, 28 Jul 2022 02:27:38 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D549753D26 for ; Wed, 27 Jul 2022 23:27:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658989657; x=1690525657; h=message-id:date:mime-version:cc:to:references:from: subject:in-reply-to:content-transfer-encoding; bh=jOlcrF54BgdoCTWPvBjjzQ5jHjfAyaaVLW7zTceQpag=; b=QSGNlIJhxqWdPd/EPOFlGepO3LCuK5PHP+9TeySwMf43M5lJR/bYmou+ 8GMV779rn8dz+N/FjUmbs2eu92pI8tLgKUf6pmER1mkVjhbVxXtAX+/9s PAS1Ita1X1D5BXIlNAcf2p0wFbi1U0f1SVKADR1JOGJYtWPLL08NMwGwP 8cVshWR/ysMhf+sfEHhWmnAiZKTpzCB4+f1euU7ODgxfy+aCiPCo4MVHA hn3oYT3wl/m5WVcHA6tlZsBOYMB6KsitwOKXZLMQI45CQ6Nr6dV6+T9Ko KToyY2FYLb3IVZMt5UwNY3LfzOnxQ7fUyQBjxCIu6nL6Eq9ihTOma7tMy Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10421"; a="268815018" X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="268815018" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 23:27:37 -0700 X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="928137045" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.254.213.160]) ([10.254.213.160]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 23:27:32 -0700 Message-ID: Date: Thu, 28 Jul 2022 14:27:30 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Cc: baolu.lu@linux.intel.com, Joerg Roedel , Christoph Hellwig , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy , Jean-Philippe Brucker , Dave Jiang , Vinod Koul , Eric Auger , Liu Yi L , Jacob jun Pan , Zhangfei Gao , Zhu Tony , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Jean-Philippe Brucker Content-Language: en-US To: Jason Gunthorpe References: <20220705050710.2887204-1-baolu.lu@linux.intel.com> <20220705050710.2887204-5-baolu.lu@linux.intel.com> <20220723141118.GD79279@nvidia.com> <686b137f-232a-2a78-beb0-e4373bd20959@linux.intel.com> <20220725144005.GE3747@nvidia.com> <6da27a6b-b580-4ba4-24c8-ebdfb2d9345d@linux.intel.com> <20220726135722.GC4438@nvidia.com> From: Baolu Lu Subject: Re: [PATCH v10 04/12] iommu: Add attach/detach_dev_pasid iommu interface In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 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_NONE,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 2022/7/28 10:44, Baolu Lu wrote: >> >> If the fabric routes PASID properly then groups are not an issue - all >> agree on this? > > I still think the singleton group is required, but it's not related to > the PCI fabric routing discussed here. > > We have a single array for PASIDs in the iommu group. All devices > sitting in the group should share a single PASID namespace. However both > the translation structures for IOMMU hardware or the device drivers can > only adapt to per-device PASID namespace. Hence, it's reasonable to > require the singleton group. Further, conceptually, we cannot support pasid attach/detach on multi- device groups. If multiple devices cannot be isolated, it is difficult to ensure that their pasid spaces are isolated from each other. Therefore, it is wrong to attach a domain to the pasid of a device. All devices in the group must share a domain. Best regards, baolu