Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp288727rdg; Thu, 12 Oct 2023 05:59:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEm0XvfRupBZl9N05l1Tnxu21p/n+AszV9OfmnlBsAR4ULfbK0a5oz6Mifo13qvl+m+qJCh X-Received: by 2002:a17:90a:858b:b0:277:5cd5:6f80 with SMTP id m11-20020a17090a858b00b002775cd56f80mr30355593pjn.16.1697115553196; Thu, 12 Oct 2023 05:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697115553; cv=none; d=google.com; s=arc-20160816; b=Y8x00uInYvzElDDzkYRB6hn5j2f3zNOxQC5s4xaS2dPitCaBBqpeirB04r70KPLZxa jeEF1g04qNRJhWPURSnxn88xffwPJXbaZ78tDEl/OwRSNOxIkB1xYl7ynEOhl895bau1 z/yoyEjytapNnwJbwedSuwDuNwJ+oJpRB9HGiWpFulzJTf09SdIqWvtGz/IAr1VvBlS5 ONcV17si5XJyto7AK3ku/4MzMGgEBM8U41sCCnzAJv9/uiGf3Z+MMyh2PHbh5Xnd/F7H 3TM/S09ecqaNzQbIl62zjJNs07DALFmYcfpbmBgx6UhiioWysyne23WIo9FiHhB6Sj/y RzhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=kZ+zXneGOPArhNSt6j3bDC7ITHZYnJpEbZbWzIfocZE=; fh=Jtbq2SGmld3DVmnHO87icIF4HdB4zzzXf+HKPrDalnk=; b=XFGuuNk9eH///h8lPEb/LgiAyRxgSn8ZJSluuOzF8RAiLiuQ3Rnz+d8zJNgvJVwKn4 Dy5Bdw7DbEJ6W2g/zjwSaI4ufIFZHfUahHOIaMZWFmgLmtbqpSbSIDwi+mC30+FA8KKo V5yuww5nx1OpeR90K0WTNoiVZGDTgx+w6+I9Y8nzDH82EyfdpRqaYUcFAUjRbsen0yQJ qP6HD/q+TRcFkMNN97hM1/OQZz5+S8YDpV1KvjBFCjJ4wFiYxepv+8Zci82jgZe9TtKN OSAaQcVDUxv2U6N+2CYYMedDSFUwgchf0eBbg4v3znjoJVPwBa7Ya5pug+a2HjVPTvFS kQZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fArE4YuH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id go15-20020a17090b03cf00b0027cde38c731si2246992pjb.17.2023.10.12.05.59.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 05:59:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fArE4YuH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 4E17E81AA53D; Thu, 12 Oct 2023 05:59:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378675AbjJLM6o (ORCPT + 99 others); Thu, 12 Oct 2023 08:58:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343971AbjJLM6n (ORCPT ); Thu, 12 Oct 2023 08:58:43 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD888C9 for ; Thu, 12 Oct 2023 05:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697115521; x=1728651521; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=FezBOs4z5b5BdyWfX/5QiwvC0F3/xtHU+YBQMpqAKP8=; b=fArE4YuH5qh2xA2WUXUevVG6uLD2VU7DW4Qe7fNpktJ3CsYaEsPPiURg U/+laN+N2kvnth8gADu7A4EGFNorUk/2eeWj/QIgnPFEnXupBfOhkvwa4 +XknxyfWv8k7mU/RUmsJKeq6lIrXTCqV5aFppADyOWW1HuS32XOY6/V4+ D1iDB+/8vXQ5PWbRG0Chh4Tg4uaUThTMHN7CN6Q5+iZQXVYexm/42rf9s upZ4wN/FSYqd3f9jTJs6ds4AVg4y9JiRRo9a12AhS5jr4/m1fHoGrvYXw P+hUxZxmq2OcE5Ikfwv3aiXLg6eAyVc4dcnKpR1/OgZOkYSxOrzHRnULs A==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="388769151" X-IronPort-AV: E=Sophos;i="6.03,219,1694761200"; d="scan'208";a="388769151" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 05:58:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="758008315" X-IronPort-AV: E=Sophos;i="6.03,219,1694761200"; d="scan'208";a="758008315" Received: from blu2-mobl.ccr.corp.intel.com (HELO [10.254.213.230]) ([10.254.213.230]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2023 05:58:32 -0700 Message-ID: Date: Thu, 12 Oct 2023 20:58:31 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Cc: baolu.lu@linux.intel.com, iommu@lists.linux.dev, jgg@nvidia.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/7] iommu: Decouple iommu_present() from bus ops Content-Language: en-US To: Robin Murphy , joro@8bytes.org, will@kernel.org References: <6711338e24dd1edfd02187f25cf40d8622cefdb2.1697047261.git.robin.murphy@arm.com> From: Baolu Lu In-Reply-To: <6711338e24dd1edfd02187f25cf40d8622cefdb2.1697047261.git.robin.murphy@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 12 Oct 2023 05:59:10 -0700 (PDT) On 2023/10/12 2:14, Robin Murphy wrote: > Much as I'd like to remove iommu_present(), the final remaining users > are proving stubbornly difficult to clean up, so kick that can down the > road and just rework it to preserve the current behaviour without > depending on bus ops. Since commit 57365a04c921 ("iommu: Move bus setup > to IOMMU device registration"), any registered IOMMU instance is already > considered "present" for every entry in iommu_buses, so it's simply a > case of validating the bus and checking we have at least once IOMMU. > > Reviewed-by: Jason Gunthorpe > Signed-off-by: Robin Murphy Reviewed-by: Lu Baolu Best regards, baolu