Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp10002rdb; Wed, 18 Oct 2023 16:07:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4hgJ+fqqzT5UP+76Q6yIR49rT9NIjEImUMUqZfZ21lj/4bo1ouI0szv+uP+Zk5k/ORDrT X-Received: by 2002:a05:6a00:17a3:b0:6b8:780:94e5 with SMTP id s35-20020a056a0017a300b006b8078094e5mr518153pfg.18.1697670443447; Wed, 18 Oct 2023 16:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697670443; cv=none; d=google.com; s=arc-20160816; b=jAebJtgYsCHkNKQB5xL86WBACVvt1R0IDgtNza853BeNnMlhBAgcQqXWEgBOtp/sXw n1ZhODAXHKLnu7bzHfl0kbSt5+8a/FBUY3R4Ang8WA1Q8Z8uHtyM85YyxJOgL63+79tu JJJFUWlhrsvjssZo0wv+4HYJP33jhJl2uPbUwTdXCS9v+C8fVAWjRy5i95yllLxp7NNX +sn4CVf+zjbELz4kE76Jgfvh8y++uzn6O0zYoLWUvaXaHKYje/FXT0M6quxpMWwgcCzE PqyGEaEFw8yjZflKdmjsKj6ZENJj529SKgqB04p3pFhBCrfNI1ePZ/njlAZVQspNPznR Uk8g== 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=emwLO1oEgFxoohwR39m91tAAqusjqAjflYtV60nLTMw=; fh=c14xs3LzuOi0SDa3e3EE/saoAB4BBu1dd3vVEr54aXo=; b=pXgp1WtbWRCTNyv3+0VqfVOovb6lUqUj4xC8+KsBjaC9wbKFMOWlqFRG9kTWJy6Xii K9S59weuLM6lu2O0TAg/KnTHIEe/fRoG3FEBillA0Z6v/iTvclLjtMJTncV8XhOmdVWl 0EoPGl0mtQVgo+ysqg0oNzCBvamwVnE29gplK3iAf9G17M6N9+dsLnlxPYWz/6pd6/v8 CNL4SaOGmYMVn8leY1E5pWQLpiSHAdarh1X8sXr7eRvDOlki6wGQwfmw83UfvsfAd6w5 ROZZliHQ5JYsXaRrWmRsb2PCkFIx4CpBKhTtq9DS1Pa8pgr2Ou5EbisFDtgoXe/aK6tA 2DKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dZ1eYnR0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id x4-20020a056a00188400b006be30cdc3d8si5114135pfh.163.2023.10.18.16.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 16:07:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dZ1eYnR0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0FE6F80A9AA5; Wed, 18 Oct 2023 16:07:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231486AbjJRXG6 (ORCPT + 99 others); Wed, 18 Oct 2023 19:06:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjJRXG5 (ORCPT ); Wed, 18 Oct 2023 19:06:57 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9872113 for ; Wed, 18 Oct 2023 16:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697670372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=emwLO1oEgFxoohwR39m91tAAqusjqAjflYtV60nLTMw=; b=dZ1eYnR0V973yD3Rvq1RLynNi2e6K9OjpMf0I2wuIVOmtSi9IhGdxitdpFuVVTXeauqH3k taJu1h5bNq0pFNu3cuulf/p2dquLJhOApW8F/CxA0kfBx8CdPwQkYLSpJvcahVLswbpvsh q+WSzN/mf9pTKPVI/Z7ynEdfdYJpJsM= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-435-0BL1qRPWPqqD5gvhLU5pxg-1; Wed, 18 Oct 2023 19:05:56 -0400 X-MC-Unique: 0BL1qRPWPqqD5gvhLU5pxg-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7788f0f099fso219051285a.1 for ; Wed, 18 Oct 2023 16:05:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697670356; x=1698275156; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=emwLO1oEgFxoohwR39m91tAAqusjqAjflYtV60nLTMw=; b=LViWb5W4kr6V2w/KKkyi81JC+UT6LMAfm4GtPlu4Kzpa2qXL1/7fXbgCCkcWFwAzfg 8MoUfkshMLWi1sQvQrszbT/lmVlyS8ygkFPIk/A1m9s9rMkZebAyA7BhPOuO8sb++tqQ XazNyS8iDs9KJqvnPrNy4JrOWoZuHEV3uydYtySoJWfkb7Ko9I0WFsxFi4lmd/sowU/3 QzoPA2DcUqXcwefCrbpPFfMnkzXcQyymEbeeq1a3b4n+0hmPWcZfXjjINWNfs5WBRYWB y+zhfH+cBmA+Ecjq/0G2zlVEzNqLkmo+kPHTC8cB8deRi7h8cqRFk6Wotd5YWV88fpjV g3pQ== X-Gm-Message-State: AOJu0YzZ/bQWcMv83bH8sr+x/Zib0OfuplnsjErKWTV42jN2gfCI5oVG 7iaSu8VKrA/7HY6bVQrtICIMedon2dtkJ42n3p0kytvumFbDPxB/gOVWTdGXp2df2PwPc26GhUT yDd15h+MCXbAowWK5VWrnjIWF X-Received: by 2002:a05:620a:3d96:b0:773:eeb1:ed1 with SMTP id ts22-20020a05620a3d9600b00773eeb10ed1mr568311qkn.51.1697670356140; Wed, 18 Oct 2023 16:05:56 -0700 (PDT) X-Received: by 2002:a05:620a:3d96:b0:773:eeb1:ed1 with SMTP id ts22-20020a05620a3d9600b00773eeb10ed1mr568299qkn.51.1697670355940; Wed, 18 Oct 2023 16:05:55 -0700 (PDT) Received: from localhost (ip98-179-76-75.ph.ph.cox.net. [98.179.76.75]) by smtp.gmail.com with ESMTPSA id e25-20020a05620a209900b007742ad3047asm307347qka.54.2023.10.18.16.05.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 16:05:55 -0700 (PDT) Date: Wed, 18 Oct 2023 16:05:54 -0700 From: Jerry Snitselaar To: Robin Murphy Cc: joro@8bytes.org, will@kernel.org, iommu@lists.linux.dev, jgg@nvidia.com, baolu.lu@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/7] iommu: Decouple iommu_present() from bus ops Message-ID: References: <6711338e24dd1edfd02187f25cf40d8622cefdb2.1697047261.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6711338e24dd1edfd02187f25cf40d8622cefdb2.1697047261.git.robin.murphy@arm.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 howler.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 (howler.vger.email [0.0.0.0]); Wed, 18 Oct 2023 16:07:19 -0700 (PDT) On Wed, Oct 11, 2023 at 07:14:49PM +0100, 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 > > --- > > v3: Tweak to use the ops-based check rather than group-based, to > properly match the existing behaviour > v4: Just look for IOMMU instances instead of managed devices > --- Reviewed-by: Jerry Snitselaar