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 20ADDE81815 for ; Tue, 26 Sep 2023 03:33:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=cINR+Pxo2jYLmdLoHqowsDEEhUOuOTKMw8sgwZXqJwQ=; b=xe9GdpP5Jo6kgG 3cO1Dw+fSphWtNESYkQU5l9Q2MrzfPfVygHxhVECumILhQ07UB8Gd4V31IRSKrTuxJFV0/5IdGsBd N/37HjxuRorkSA/s9lUEMww1+FxijnDJUlLGqesLnHrpfJO+B4d09yyRcrWacKwmEVwPHnPx4/Kpg 5lAU6NQIS618vGXJxTSHctSsO7AxCpXJZGzrSlgQrSb98bTWoinMwM/oabLZRRmVcdPwQDqIazvf2 72TsuFoOLe36X3nCmuaZA3/7KSAn4WJVDHLXQG5AKOP9eIqwiNv7yvGnxJja/hx2NPbZdGY3wlIO7 dDGcMbPUeL5l8NKEsLBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qkyoI-00FU6z-32; Tue, 26 Sep 2023 03:32:30 +0000 Received: from mgamail.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qkyoF-00FU5z-2w for linux-arm-kernel@lists.infradead.org; Tue, 26 Sep 2023 03:32:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695699147; x=1727235147; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=j5sV+dy3BVav18WZOciO3rS/x/PvG9EXKQ8HyMFJTGc=; b=mUOa62lRqe0fXiCZ4JQsAJ5/VArcyTcEPeYxRN1tjIYpAXzSTzQ5oZS+ DwhiN2VgZKPX1SqeX0HOzqviAUj4yhTyeLCwbRUK/Fgr8ht9hnnuV6EW1 /AnZUJ6anHJCgMezPhUCHycdk7fXa2uF4MKUN1GNHsnXjRQt9Vueqj3u2 yjiTW1J5hbrOzpLx4WG6lqDs+NVCDuwPUb+YHRxoJmakA3CvKYTj2B3af 9YnQAQ0vCchFKPturnIZjESa4IlmDZnqvhK5Z45VqWsEq0CkHVuLpqgmm tQe7exp+nb8W7ezAFeF2vp1RnLogFkuoR/KelJnXwZpQ7330++MpSBxyW g==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="360849980" X-IronPort-AV: E=Sophos;i="6.03,176,1694761200"; d="scan'208";a="360849980" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 20:32:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="1079535961" X-IronPort-AV: E=Sophos;i="6.03,176,1694761200"; d="scan'208";a="1079535961" Received: from allen-box.sh.intel.com (HELO [10.239.159.127]) ([10.239.159.127]) by fmsmga005.fm.intel.com with ESMTP; 25 Sep 2023 20:32:14 -0700 Message-ID: Date: Tue, 26 Sep 2023 11:28:58 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Cc: baolu.lu@linux.intel.com, Alyssa Rosenzweig , asahi@lists.linux.dev, Christophe Leroy , David Woodhouse , iommu@lists.linux.dev, Joerg Roedel , Kevin Tian , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Hector Martin , Michael Ellerman , Nicholas Piggin , Robin Murphy , Sven Peter , Will Deacon Subject: Re: [PATCH 3/8] iommu/vt-d: Use ops->blocked_domain Content-Language: en-US To: Jason Gunthorpe References: <3-v1-8060f06462cc+c0a39-dart_paging_jgg@nvidia.com> <20230925114142.GU13733@nvidia.com> From: Baolu Lu In-Reply-To: <20230925114142.GU13733@nvidia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230925_203227_979443_FCFCB7B3 X-CRM114-Status: GOOD ( 18.06 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 9/25/23 7:41 PM, Jason Gunthorpe wrote: > On Mon, Sep 25, 2023 at 10:29:52AM +0800, Baolu Lu wrote: >> On 9/23/23 1:07 AM, Jason Gunthorpe wrote: >>> Trivially migrate to the ops->blocked_domain for the existing global >>> static. >>> >>> Signed-off-by: Jason Gunthorpe >>> --- >>> drivers/iommu/intel/iommu.c | 3 +-- >>> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> Reviewed-by: Lu Baolu >> >> P.S. We can further do the same thing to the identity domain. I will >> clean it up after all patches are landed. > > I looked at that, and it is not trivial.. > > Both the Intel and virtio-iommu drivers create an "identity" domain > out of a paging domain and pass that off as a true "identity" > domain. So neither can set the global static since the determination > is at runtime.. Emm, yes. The early hardware requires a real 1:1 mapped page table. The recent implementations are no longer needed. > > What I was thinking about doing is consolidating that code so that the > core logic is the thing turning a paging domain into an identity > domain. Yes. It's not trivial. Needs a separated series with some refactoring efforts. Best regards, baolu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel