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 C5240CCD1BC for ; Thu, 23 Oct 2025 05:10:57 +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:Cc:To:Subject: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=tVi+SMQpaF6yHsX8HGJ1IoRGDVppUsAV0LuGQp56B6g=; b=ucwR0is5LkJagAkl7hvEJYytnd NZnTQ8DsnRKQDe4fEqgiawzvyRCE4wiVIVPIbsoLq3kFM9io/m+dp8/cI66nBClehP7xFr4p7nepP 0nAVreT2aMfFHaxoO1zzh9vTh4YSnyaauAZLjNF2LSS0xwntTKD6ew+CvL576gqTdVfITMVIJUFfT NbjOP2FlqKJwhql9KbVGh4YAIGhZdcgVZg1LTTRfXNW3EsNrMQVJseqdfSjO6GM4n56zjNvTDlHBp yj+4lg6DyP5nU1TW0mmiP3C+RoYPAK6nX3XwGc17aPTgPTSUNpf1dIOw3SEDpzn7eNaYNxUTqh9TU 2XCCo98w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBnbF-000000056rP-0A4X; Thu, 23 Oct 2025 05:10:57 +0000 Received: from mgamail.intel.com ([198.175.65.19]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBnbB-000000056qb-10Xp; Thu, 23 Oct 2025 05:10:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1761196253; x=1792732253; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=aKhXAgLHi9hmESNfGrTuSyyU3uGYkrJW93/qzCuJl3Y=; b=XyUe4s64+b7dZcsClpFC1fa205noo/qwh3aN3L1RBLhOHJQcyG656Buz yVubKU55OQHpWJuZuIsJkN/4yiruiXLu40vCHKGscXOzWi6Luddzfx7mi kaiM0atmSkTE4A0OFMf6yd+C7nwzimVfJCywj9BDj7O90ulr85P9hOaRR RP+0dFiERSuLYyI8bmApFtEqCxtaFiAu2OnGr8YmAEz2Osa8LUM99Cn9a 1s7TXhPQtB/USuaNqfD/YG4lCklz27wwodVP1L/eu6I6hKVw19UzFDuaE fmr0ND7GNaiq7hN8Xd77wn5fc9QQ1qQGjb1qvgs/vwzHg1S8n7bZJkauW w==; X-CSE-ConnectionGUID: Vf5ghi0tQQWGgIzwidoVaA== X-CSE-MsgGUID: Gm0cOGUAROuJKDK+q0y9Lg== X-IronPort-AV: E=McAfee;i="6800,10657,11586"; a="63249084" X-IronPort-AV: E=Sophos;i="6.19,248,1754982000"; d="scan'208";a="63249084" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2025 22:10:52 -0700 X-CSE-ConnectionGUID: Z+VhdaUHRuSq6XPL/6mgHA== X-CSE-MsgGUID: PVLbJFWUT5qWiIesV7OmAg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,248,1754982000"; d="scan'208";a="214988427" Received: from allen-sbox.sh.intel.com (HELO [10.239.159.30]) ([10.239.159.30]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2025 22:10:47 -0700 Message-ID: <9292db0f-74cd-4ce5-8797-cc2a88449768@linux.intel.com> Date: Thu, 23 Oct 2025 13:06:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/3] iommu: Allow drivers to say if they use report_iommu_fault() To: Jason Gunthorpe , AngeloGioacchino Del Regno , Christian Benvenuti , Heiko Stuebner , iommu@lists.linux.dev, Jernej Skrabec , Joerg Roedel , Leon Romanovsky , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-rdma@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-sunxi@lists.linux.dev, Matthias Brugger , Nelson Escobar , Rob Clark , Robin Murphy , Samuel Holland , Suravee Suthikulpanit , Chen-Yu Tsai , Will Deacon , Yong Wu Cc: patches@lists.linux.dev References: <3-v1-391058a85f30+14b-iommu_set_fault_jgg@nvidia.com> Content-Language: en-US From: Baolu Lu In-Reply-To: <3-v1-391058a85f30+14b-iommu_set_fault_jgg@nvidia.com> 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-20251022_221053_496792_9376B476 X-CRM114-Status: GOOD ( 13.09 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On 10/23/25 01:12, Jason Gunthorpe wrote: > report_iommu_fault() is an older API that has been superseded by > iommu_report_device_fault() which is capable to support PRI. > > Only two external drivers consume this, drivers/remoteproc and > drivers/gpu/drm/msm. Ideally they would move over to the new APIs, but for > now protect against accidentally mix and matching the wrong components. > > The iommu drivers support either the old iommu_set_fault_handler() via the > driver calling report_iommu_fault(), or they are newer server focused > drivers that call iommu_report_device_fault(). > > Include a flag in the domain_ops if it calls report_iommu_fault() and > block iommu_set_fault_handler() on iommu's that can't support it. > > Signed-off-by: Jason Gunthorpe > --- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 1 + > drivers/iommu/arm/arm-smmu/qcom_iommu.c | 1 + > drivers/iommu/iommu.c | 6 +++++- > drivers/iommu/ipmmu-vmsa.c | 1 + > drivers/iommu/mtk_iommu.c | 1 + > drivers/iommu/mtk_iommu_v1.c | 1 + > drivers/iommu/omap-iommu.c | 1 + > drivers/iommu/rockchip-iommu.c | 1 + > drivers/iommu/sun50i-iommu.c | 1 + > include/linux/iommu.h | 3 +++ > 10 files changed, 16 insertions(+), 1 deletion(-) Reviewed-by: Lu Baolu