From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DA75625; Tue, 15 Aug 2023 00:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692061025; x=1723597025; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=EMtekiFoo0Tblby6wZQ8ziVNSJFBHzBXovBoPNar8KU=; b=dUBnHrVqBwVz/BIyiNggvUg+BtAWocp/xySTicWL7ortznwzjr9KhBYC bDJkRmiiwtcdL4gBQeDS0MvdYI3FuQoZyMITXLIzvv5RXA+tYcywDu8bZ 90nj2lJ8eToDokYSyvY+BNO1XkEna1sBxWZZAbu6pOQDMIo3gwDRhzMLV qRNVRliridk0/pp6NXoXR/n0W26lWU8fxEefSxUbiOUkYfrFZE2+WS3zj tMF9YTYQ1DW15tstjflfWw+ubJNh36VYZGUE5Q9DxWensGF9jWo54CYC5 Ci/P4IJ1Y0J9tk/Og5qzsAmVrwyvknXuHnGP6tThKg1abYNd1YG0TIF6n g==; X-IronPort-AV: E=McAfee;i="6600,9927,10802"; a="362322777" X-IronPort-AV: E=Sophos;i="6.01,173,1684825200"; d="scan'208";a="362322777" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2023 17:56:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10802"; a="857243905" X-IronPort-AV: E=Sophos;i="6.01,173,1684825200"; d="scan'208";a="857243905" Received: from blu2-mobl.ccr.corp.intel.com (HELO [10.254.215.149]) ([10.254.215.149]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2023 17:56:42 -0700 Message-ID: Date: Tue, 15 Aug 2023 08:56:40 +0800 Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Cc: baolu.lu@linux.intel.com, Andy Gross , Alim Akhtar , Bjorn Andersson , AngeloGioacchino Del Regno , Baolin Wang , Christophe Leroy , Gerald Schaefer , Heiko Stuebner , iommu@lists.linux.dev, Jernej Skrabec , Jonathan Hunter , Joerg Roedel , Kevin Tian , Konrad Dybcio , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-s390@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, Russell King , linuxppc-dev@lists.ozlabs.org, Matthias Brugger , Matthew Rosato , Michael Ellerman , Nicholas Piggin , Orson Zhai , Rob Clark , Robin Murphy , Samuel Holland , Thierry Reding , Krishna Reddy , Chen-Yu Tsai , Will Deacon , Yong Wu , Chunyan Zhang , Dmitry Osipenko , Marek Szyprowski , Nicolin Chen , Niklas Schnelle , Steven Price , Thierry Reding Subject: Re: [PATCH v6 17/25] iommu/qcom_iommu: Add an IOMMU_IDENTITIY_DOMAIN Content-Language: en-US To: Jason Gunthorpe References: <17-v6-e8114faedade+425-iommu_all_defdom_jgg@nvidia.com> <8cef9a0d-15ba-f8af-7e22-d4d3063c97bf@linux.intel.com> From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2023/8/14 23:36, Jason Gunthorpe wrote: > On Mon, Aug 14, 2023 at 02:32:33PM +0800, Baolu Lu wrote: > >>> + pm_runtime_get_sync(qcom_iommu->dev); >>> + for (i = 0; i < fwspec->num_ids; i++) { >>> + struct qcom_iommu_ctx *ctx = to_ctx(qcom_domain, fwspec->ids[i]); >>> + >>> + /* Disable the context bank: */ >>> + iommu_writel(ctx, ARM_SMMU_CB_SCTLR, 0); >>> + >>> + ctx->domain = NULL; >> Does setting ctx->domain to NULL still match this semantics? > Yes, I did not try to fix this driver. NULL means identity in the > ctx->domain. Okay. Best regards, baolu