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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 3D503E81815 for ; Tue, 26 Sep 2023 03:33:27 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=CyuwDAqN; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Rvlh54mZtz3cl1 for ; Tue, 26 Sep 2023 13:33:25 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=CyuwDAqN; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.intel.com (client-ip=192.55.52.136; helo=mgamail.intel.com; envelope-from=baolu.lu@linux.intel.com; receiver=lists.ozlabs.org) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Rvlg34N6Lz3c4R for ; Tue, 26 Sep 2023 13:32:29 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695699152; x=1727235152; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=j5sV+dy3BVav18WZOciO3rS/x/PvG9EXKQ8HyMFJTGc=; b=CyuwDAqN/lQ47yVsv8Y+UoniRAC0BPRlO9+1QxrEV/utHA/faKHmWVRT daoDPgVnz1lfQ8xVHzVwxEN1zBed5YbtaxanGAxB89jifvpt3OHs1o4vl HotA6xD72+8Jbz+YLUMEmlWjiE+MDewXbMg52z2DzWaJ/XkoVkDe1yyB3 11YDtOpskAKlqNz43f+zAAmX8ej3VjPCL783pveBzphyKfIRylNA454Wx AnLbAtexEStXFraRhxhjhtHMceOKgi+s8sRVRgF8jFIUe66xmzuXVlj4B Siallm4jA+9D8N8uGtsyd2JycX8q0TtG1C2lT6odu+hX30GT4QChqykj0 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="360849979" X-IronPort-AV: E=Sophos;i="6.03,176,1694761200"; d="scan'208";a="360849979" 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 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> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Kevin Tian , Will Deacon , Sven Peter , linuxppc-dev@lists.ozlabs.org, Joerg Roedel , Hector Martin , Nicholas Piggin , Robin Murphy , iommu@lists.linux.dev, asahi@lists.linux.dev, David Woodhouse , Alyssa Rosenzweig , baolu.lu@linux.intel.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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