Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp15170rdb; Wed, 18 Oct 2023 16:19:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmuLVsIrbYZJ+Rvov2SsLkRuGAiGro//NXZgn1TzbBEMe+f0bRTsrYoXCu9aCmsz4HdxQB X-Received: by 2002:a05:6a20:26a0:b0:17b:1696:e5ea with SMTP id h32-20020a056a2026a000b0017b1696e5eamr465946pze.14.1697671154037; Wed, 18 Oct 2023 16:19:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697671154; cv=none; d=google.com; s=arc-20160816; b=xWclVNpOyEv0FK3ainUeouj2EMXJwglDb8AX9ULL3XL/mur8xPC812HffWNyj2asaS cHAps6+/NcSS3H4EIs42FUYI+qFNrjMCkpBKSfrQX/y27WCoKpVcjFB5nN0ANUqK+Ms8 fp2QbVqHJzc1qVharL8g4fMlmUOzSoB1uyvKPf/Zl14TaO0msrdU6A6LcwuDpbwQM7dh MKM9sSIctjGE7z2rVnP90JuTdmM4TGWEx+jQnUzgRk3Xy7OuNWABMTOGi/hBmNz3kqRB BzQF5gcsI1+vzIK0kuO98U3/YU44irWaqdnt3AZ5pM1lmKz55pmpy7a6nozda4JDum82 nXdQ== 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=eGKv31T20FLnyp7D1PvYxnTsDDoyuURiN0uwwMl987c=; fh=c14xs3LzuOi0SDa3e3EE/saoAB4BBu1dd3vVEr54aXo=; b=KRqdbHj+zNLSZdtvREhtmzhkY7/5Ay7O+WevpbCWGYzDXfVOJD05Gn4f8CCbGciQhq r5txYQ1CBdk5q77ZzBPuDWHNiFI2gO0scNi0X++7PjZPguMDLNO+YpSjN/koDK1YP6VV YZKIJP+9PGlDtLS+xmGEvTldGvygFY/lg0TsH8LoqexBiBnIAGkGrUVB0cr/T+7Rnoer 6sWu7iD71GD7Hfa+p+OfIkDq9vJaQOysajnluAET5lWiFH5n5PAJmLgwbzdKCJVA/1T9 l05Yv9+SK9GlrCHvZ9GoraN1rrqZ8Ki7XDLh91gKHJWwCfLNc1ZqF802qDl2A/VtzVkr zbdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=R4unvUN5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id f6-20020a170902e98600b001ca529e3d29si865578plb.168.2023.10.18.16.19.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 16:19:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=R4unvUN5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 17FC18225CAF; Wed, 18 Oct 2023 16:19:08 -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 S232906AbjJRXRe (ORCPT + 99 others); Wed, 18 Oct 2023 19:17:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232149AbjJRXQm (ORCPT ); Wed, 18 Oct 2023 19:16:42 -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 B4A1A115 for ; Wed, 18 Oct 2023 16:15:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697670953; 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=eGKv31T20FLnyp7D1PvYxnTsDDoyuURiN0uwwMl987c=; b=R4unvUN5to1Kkvvpk4bmruKvVNQKdAPBkcpgq7hM/4hu4fkFBmKRht7C1p7mjXvFI3xYsq DJY4QkKezz0LBs/0bDH33OQuWSnunYmfoEzm1/bMFaJN+DRc6NIeUbL86dHPT2QcQk5ejq px+7ooVp2ZDiYyzCQlLATSL2DzdeFAs= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-453-gjk2Z5s9NB2-OlzxVlrA-g-1; Wed, 18 Oct 2023 19:15:52 -0400 X-MC-Unique: gjk2Z5s9NB2-OlzxVlrA-g-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7740517a478so896365985a.3 for ; Wed, 18 Oct 2023 16:15:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697670952; x=1698275752; 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=eGKv31T20FLnyp7D1PvYxnTsDDoyuURiN0uwwMl987c=; b=dIfR/YQ9z6tFv7UVR1eRP3/F5qMHgzU0sh1lF+H3/qwtM2XzgOIkdy/Uhk5TAzAoc8 XIhKsoytbpE+/jGqF6Dv9qGk+GpZDJYlHCLoLBSiawsMm0cMp14vN19vYQM7pIBRSzkf +nOs2Fck+gjwRr3hF4a1GDByJPOW2546LrQFU1ksunB1EqulDtYTQkQXESnn85hTXR53 HK/tKEX+ooQMmx1KFtCkRyOOlvcMWyq2NNjWpNXTKPg2189efCR82vjD3yxKRo9Ilhjc UMb0eGGVrfvXhevLkRvVWEBJRmTz9Wjur6mnRLWt2HLsiZTvyfyLM83il5gHbvF3xz65 4cwQ== X-Gm-Message-State: AOJu0YxUdFXpYlELrRsrTQJot8ZouZ6s3lyZXHp0CR25zeTSqaAdrlC7 n5Tuz+IbwB7z9QPF0dcY3mMn+NpV4fWeCe0rBqacnpYIOiapjUlPJ70zZLCVhmBDsVgURjWsk7f ATPG8FOmxP237jFpcgWURSkDN X-Received: by 2002:a05:620a:3d13:b0:778:8fdf:1b4 with SMTP id tq19-20020a05620a3d1300b007788fdf01b4mr490888qkn.57.1697670952092; Wed, 18 Oct 2023 16:15:52 -0700 (PDT) X-Received: by 2002:a05:620a:3d13:b0:778:8fdf:1b4 with SMTP id tq19-20020a05620a3d1300b007788fdf01b4mr490878qkn.57.1697670951842; Wed, 18 Oct 2023 16:15:51 -0700 (PDT) Received: from localhost (ip98-179-76-75.ph.ph.cox.net. [98.179.76.75]) by smtp.gmail.com with ESMTPSA id k16-20020a05620a07f000b00775bb02893esm311733qkk.96.2023.10.18.16.15.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 16:15:51 -0700 (PDT) Date: Wed, 18 Oct 2023 16:15:50 -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 4/7] iommu: Decouple iommu_domain_alloc() from bus ops Message-ID: References: <81a0a66d76b3826f1a0b55d7fbaf0986034c7abc.1697047261.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <81a0a66d76b3826f1a0b55d7fbaf0986034c7abc.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:19:08 -0700 (PDT) On Wed, Oct 11, 2023 at 07:14:51PM +0100, Robin Murphy wrote: > As the final remaining piece of bus-dependent API, iommu_domain_alloc() > can now take responsibility for the "one iommu_ops per bus" rule for > itself. It turns out we can't safely make the internal allocation call > any more group-based or device-based yet - that will have to wait until > the external callers can pass the right thing - but we can at least get > as far as deriving "bus ops" based on which driver is actually managing > devices on the given bus, rather than whichever driver won the race to > register first. > > This will then leave us able to convert the last of the core internals > over to the IOMMU-instance model, allow multiple drivers to register and > actually coexist (modulo the above limitation for unmanaged domain users > in the short term), and start trying to solve the long-standing > iommu_probe_device() mess. > > Signed-off-by: Robin Murphy > > --- > > v5: Rewrite, de-scoping to just retrieve ops under the same assumptions > as the existing code. > --- Reviewed-by: Jerry Snitselaar