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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 26E70EE6432 for ; Thu, 12 Sep 2024 04:50:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:Cc:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QDFLE24bo/+uuzv6exmtcd4TuL/Kq27OZ+fOMhWqCps=; b=waFqGaEDdm/GmAttIjls0sAMtB WDBmf4aYpjIyYIStdxZXUIprW4LULh/D2z4X7b0XkR1kG1cXuA/wxsQYDrm1+xgjYskH1xmiWOEpT 5aZ3nDJxEG8XdUt3Fo7tKzmHT7/95QUCbLdHrMX3MZG6RA6XlJxpyXfteJBkO4nixAg85EbiY0P+N W24tA6OneVz8lmaZU3bYdjPsIzbnYpQ5bjOSPFs2l/TVRzoM+GW3tq5/k82Hywklrumr2xklUrpOM H8N5HI+0oJlu79maJbzP/dSB0x2E/Yc8xnqG2dmqre6v6a0RMdt3q7ItFcD1x7jmwBRYRqr7a0c4o QGKSMxVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sobms-0000000Br5y-3Qai; Thu, 12 Sep 2024 04:50:34 +0000 Received: from mgamail.intel.com ([198.175.65.21]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soblo-0000000Bqwu-1PUw for linux-arm-kernel@lists.infradead.org; Thu, 12 Sep 2024 04:49:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1726116568; x=1757652568; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=zNzFu5RANTqgQEFZ3q+RjpUP/gjte2/5W0pw3L558ww=; b=SwuL475WH/lHmkIwxnUYLz3WiE3YbZKbVGTBjPJpCgAL94VlW9QFUqz+ fLdXZLsoYqK31Eg2u6EYEClk5KdukFpZQzu8I+V4HpHdrvAqTRjh0iFrz gnXc+wpvCxHy7ZNcWOpOdPkdKONltsFUYR84cEEwF3jbdEZLZGjy/wDUA VYtmhVUuwWFgOxqMKcEhvIgak2VoUkQ90uJxpUdopIt8ITcyuig+mablr SNyIArazcud+NBPEWPNBxYwkUSBGN0BiX7n/CSXTUfrwEiymTMgtA6i/p TWAqnPhKKa3zhCuEg/NMP4fQMPuqHLZd5BPvNgqVOOYU84Wf5cwOgPrcX Q==; X-CSE-ConnectionGUID: 9xK0hoa0R26KS1Mhv/wIUQ== X-CSE-MsgGUID: ypGFlXZ7Qj6vb7UpUS6S7g== X-IronPort-AV: E=McAfee;i="6700,10204,11192"; a="24884247" X-IronPort-AV: E=Sophos;i="6.10,221,1719903600"; d="scan'208";a="24884247" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2024 21:49:26 -0700 X-CSE-ConnectionGUID: s5nGQCotTcu1OBUAPG1HIA== X-CSE-MsgGUID: /4HgxVooSYqGyqsGcyDwVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,221,1719903600"; d="scan'208";a="68373893" Received: from allen-box.sh.intel.com (HELO [10.239.159.127]) ([10.239.159.127]) by orviesa008.jf.intel.com with ESMTP; 11 Sep 2024 21:49:22 -0700 Message-ID: Date: Thu, 12 Sep 2024 12:45:16 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: baolu.lu@linux.intel.com, Jason Gunthorpe , "will@kernel.org" , "joro@8bytes.org" , "suravee.suthikulpanit@amd.com" , "robin.murphy@arm.com" , "dwmw2@infradead.org" , "shuah@kernel.org" , "linux-kernel@vger.kernel.org" , "iommu@lists.linux.dev" , "linux-arm-kernel@lists.infradead.org" , "linux-kselftest@vger.kernel.org" , "eric.auger@redhat.com" , "jean-philippe@linaro.org" , "mdf@kernel.org" , "mshavit@google.com" , "shameerali.kolothum.thodi@huawei.com" , "smostafa@google.com" , "Liu, Yi L" Subject: Re: [PATCH v2 17/19] iommu/arm-smmu-v3: Add arm_smmu_viommu_cache_invalidate To: Nicolin Chen , "Tian, Kevin" References: <4b61aba3bc6c1cce628d9db44d5b18ea567a8be1.1724776335.git.nicolinc@nvidia.com> <20240905162039.GT1358970@nvidia.com> <20240905182148.GA1358970@nvidia.com> Content-Language: en-US From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_214928_474549_16780D81 X-CRM114-Status: GOOD ( 16.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 9/12/24 5:08 AM, Nicolin Chen wrote: > On Wed, Sep 11, 2024 at 08:17:23AM +0000, Tian, Kevin wrote: > >>> My understanding of VMID is something like domain id in x86 arch's. Is >>> my understanding correct? >> yes >> >>> If a VMID for an S2 hwpt is valid on physical IOMMU A but has already >>> been allocated for another purpose on physical IOMMU B, how can it be >>> shared across both IOMMUs? Or the VMID is allocated globally? >>> >> I'm not sure that's a problem. The point is that each vIOMMU object >> will get a VMID from the SMMU which it's associated to (assume >> one vIOMMU cannot span multiple SMMU). Whether that VMID >> is globally allocated or per-SMMU is the policy in the SMMU driver. >> >> It's the driver's responsibility to ensure not using a conflicting VMID >> when creating an vIOMMU instance. > It can happen to be the same VMID across all physical SMMUs, but > not necessary to be the same, i.e. two SMMUs might have two VMIDs > with different ID values, allocated from the their own VMID pools, > since cache entries in their own TLB can be tagged with their own > VMIDs. > > Does domain id for intel-iommu have to be the same? No. A paging domain may have different domain IDs on different IOMMUs for Intel iommu driver. > I recall there > is only one iommu instance on intel chips at this moment? No. There might be multiple iommu instances on a chip but they share a common iommu driver ops. Thanks, baolu