Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3505045pxb; Mon, 24 Jan 2022 10:58:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIP0CzSc84QjQtVZbtqe/kf+uI0UxWRsSLXJmFolG8Q2Qr5tcK76WrNedDzScxXzTY4xlG X-Received: by 2002:a63:2c47:: with SMTP id s68mr12734819pgs.97.1643050706050; Mon, 24 Jan 2022 10:58:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643050706; cv=none; d=google.com; s=arc-20160816; b=ZDAtjoM5RrI9WgHG/czKlfb+KUNcRAm/0GQBqL90J+kV4NgoUNSSSUgei/+RctteZc O3jD2x1D3HaYitMQfFu3cpXFNc7jh/8V81I47s4jDciTZv0lH+vykLXVDgpK5hwumlIU I/ZxhawHeXH+m0WESFGz8TbKS1sVtB3HFROYnJs3+xgW7PEjn7EBsRvsA+CerLKv2ib8 SJUfSGfPDv2zJBL1hCNaNkrp5eMXekLpPBu1DLIoBklAKTYDcriZpJpsXdsecgb4COMK IzQh0vLyy9TSXMMb8QKu1G5QT3hsGb+hr1o2DIgL341VAtFD4Y00NPqW/yXkvZ+wUaGk ccJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=apuUXH+60n6hljRak/UVGWlJLkn1KcaMbpnLlafoj9s=; b=Jd1wQqZTvze/9h9qNyMOJUiERPUoJMMl/9qjnW9lh62JODyE7wEgw1kr/6Zib7z9ht YGxHHBHkOzqF+kqRNueDTEAjQ+JxuTLAu+OkWWAeZhsx5oQnUKNW5H5WaoMqFtUEeBsH 04DCYaX3t6quW1xfC9Ex8NCLvQ8DW2fS3Lav0cM0Ze7+XU0z+B3JEAfP2BIerp80mnXs bODHsUsNTKc+NsOCFAbFZHTR5GvDkWc29sIEeQsc0OAoxziYzu+YUz64RkxiSioDaGex McLZG6KTgjka1NmiswaSEKJvFHxYj1GYQ3i01Khmavt05tWB5BptNJmXTtRb8SdJPdQW h7AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=hVSTPrEc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w71si1141750pgd.43.2022.01.24.10.58.12; Mon, 24 Jan 2022 10:58:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=hVSTPrEc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233779AbiAXJcX (ORCPT + 99 others); Mon, 24 Jan 2022 04:32:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbiAXJcW (ORCPT ); Mon, 24 Jan 2022 04:32:22 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F555C06173B for ; Mon, 24 Jan 2022 01:32:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=apuUXH+60n6hljRak/UVGWlJLkn1KcaMbpnLlafoj9s=; b=hVSTPrEcrShyI50dK3OBPQnhac maUZoKQh8S9+L4HSCfX2bpnHFRylBiAFnpnySwK8VANInwz9+Q3PQczTrtReo2Z71IhkalEjU9IrX zp1orRmwMunA4S4gWCFQy//JLgYjB6uZgjzVtCH2nptqNpe2886yBsOy4RWYBPvcmxqM1/R+gakd3 CfRiiJDFzOnXcLZn4FAILBTaqCOcC0/GZUvlwNJRwVmulvcGydFJWZDE90TGJEdgn6HbZB8wIVBk0 KVLzMKAeJE9URH+f89yX5NaN7ayeFp1EowP4ZeaXe80w9FRuO83rSHt1owTqL7Kz0QWEZSsJD7HP4 7zCyL4MQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBvht-002nqj-Nq; Mon, 24 Jan 2022 09:32:13 +0000 Date: Mon, 24 Jan 2022 01:32:13 -0800 From: Christoph Hellwig To: Lu Baolu Cc: Joerg Roedel , Jason Gunthorpe , Christoph Hellwig , Ben Skeggs , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy , Alex Williamson , Eric Auger , Liu Yi L , Jacob jun Pan , David Airlie , Daniel Vetter , Thierry Reding , Jonathan Hunter , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/7] iommu: Use right way to retrieve iommu_ops Message-ID: References: <20220124071103.2097118-1-baolu.lu@linux.intel.com> <20220124071103.2097118-7-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220124071103.2097118-7-baolu.lu@linux.intel.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 24, 2022 at 03:11:01PM +0800, Lu Baolu wrote: > The common iommu_ops is hooked to both device and domain. When a helper > has both device and domain pointer, the way to get the iommu_ops looks > messy in iommu core. This sorts out the way to get iommu_ops. The device > related helpers go through device pointer, while the domain related ones > go through domain pointer. Ugg. This really sounds like we should have a different structures for each set of ops?