Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp389696pxt; Fri, 6 Aug 2021 04:39:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS8+0VfOxyZUHSvc47NeiugRU/jG5vyFPXzfp7YPGPPFtB6UicUdeyiAx9iQzoQnYxi50z X-Received: by 2002:a05:6e02:6c1:: with SMTP id p1mr1033355ils.292.1628249967061; Fri, 06 Aug 2021 04:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628249967; cv=none; d=google.com; s=arc-20160816; b=kEucg05T+2iCerebbZHHm07AXoc9C6gCvKPoNVi+80GKGrx5iYxqyZu1BUxZmSYsb6 fUXlaDdBZJphl/4Ial/sKX+k6fyOo12/EJ5MLPvfQKc8xSIC7FQsvmfcoSEYVeP05YfS oyOy8l681eJdZBjMmN1d0ZfTo1eghPH2mHiHRWkxZhDGgXJO9nPtvqCPNM7wlrxDQJwh Hd7EA8/sF/reYNMSJHvLNNi5nsOCmkrm2gFP54DhiIzQLn/qxyXC0xjYpjev+m42DDB1 NhdgdrLo10YJkzxPAfc5JJIzKQcG13iiIb0vZvwcQepFAWxnGPsawLJfAUo+k8ywHcT4 Hn2g== 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=H07A1vmsG7/hmEZvTTKfG6W1Nqbvj1job+oTNmVUUFA=; b=Tv2C9jnBj/YGaaOmZxYKCj25UxHooHSl4bh9wFpTkahJv2wPhW1TPcUKbC2+OqHnwF tJfzuNqcvzHku1+l5svttx2AMcM/bR/Va/aCB8MBK/OxLxFj9wRjOO3cAks9AYkvvcHX KgW7jQw5nxRk4JIgqrO93MVTJUcWI5yYNzDFuqV5ztgJ4fDi4nxvapwY77A+/F/JLDGx x1r2fEF7X20iPMRg1hfXeWjndXdMKCJ9bz8f9F0EBRT5kCaNFES5Mx1XiQ5v+WXkt8xC 0De3RMZuHrplLg+YPPenU7i1/rWL/vfsxAdcqeDbmR2ZQVcdmoOAFIwIi7LaMOIwSNSb tWIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gibson.dropbear.id.au header.s=201602 header.b=PwL5ZJgI; 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 g5si8371201ilk.74.2021.08.06.04.39.15; Fri, 06 Aug 2021 04:39:27 -0700 (PDT) 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=@gibson.dropbear.id.au header.s=201602 header.b=PwL5ZJgI; 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 S243124AbhHFFdR (ORCPT + 99 others); Fri, 6 Aug 2021 01:33:17 -0400 Received: from ozlabs.org ([203.11.71.1]:34203 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243069AbhHFFdO (ORCPT ); Fri, 6 Aug 2021 01:33:14 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4GgvJT5CmJz9sWl; Fri, 6 Aug 2021 15:32:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1628227977; bh=H07A1vmsG7/hmEZvTTKfG6W1Nqbvj1job+oTNmVUUFA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PwL5ZJgISfrA9Ti81rxOUK7eS71N98wp2QENeeQcD3uBMmUdAWCKV3aqowF6NZOXh XI8W9HWfT1skRy4PZRx6ZQAUDg0g2DIbGv5UrWp94sJS7NqcsU7UAViaxcPyoHHi0b L+XALLz8KF0a+k3IWu0mPt0P9+s9QVX4yrejWGZE= Date: Fri, 6 Aug 2021 14:24:28 +1000 From: David Gibson To: Jason Gunthorpe Cc: "Tian, Kevin" , "Alex Williamson (alex.williamson@redhat.com)" , Jean-Philippe Brucker , Jason Wang , "parav@mellanox.com" , "Enrico Weigelt, metux IT consult" , Paolo Bonzini , Shenming Lu , Joerg Roedel , Eric Auger , Jonathan Corbet , "Raj, Ashok" , "Liu, Yi L" , "Wu, Hao" , "Jiang, Dave" , Jacob Pan , Kirti Wankhede , Robin Murphy , "kvm@vger.kernel.org" , "iommu@lists.linux-foundation.org" , David Woodhouse , LKML , Lu Baolu Subject: Re: [RFC v2] /dev/iommu uAPI proposal Message-ID: References: <20210730145123.GW1721383@nvidia.com> <20210804140742.GI1721383@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="waHxV1qIfKEUr127" Content-Disposition: inline In-Reply-To: <20210804140742.GI1721383@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --waHxV1qIfKEUr127 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 04, 2021 at 11:07:42AM -0300, Jason Gunthorpe wrote: > On Tue, Aug 03, 2021 at 11:58:54AM +1000, David Gibson wrote: > > > I'd rather deduce the endpoint from a collection of devices than the > > > other way around... > >=20 > > Which I think is confusing, and in any case doesn't cover the case of > > one "device" with multiple endpoints. >=20 > Well they are both confusing, and I'd prefer to focus on the common > case without extra mandatory steps. Exposing optional endpoint sharing > information seems more in line with where everything is going than > making endpoint sharing a first class object. >=20 > AFAIK a device with multiple endpoints where those endpoints are > shared with other devices doesn't really exist/or is useful? Eg PASID > has multiple RIDs by they are not shared. No, I can't think of a (non-contrived) example where a device would have *both* multiple endpoints and those endpoints are shared amongst multiple devices. I can easily think of examples where a device has multiple (non shared) endpoints and where multiple devices share a single endpoint. The point is that making endpoints explicit separates the various options here from the logic of the IOMMU layer itself. New device types with new possibilities here means new interfaces *on those devices*, but not new interfaces on /dev/iommu. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --waHxV1qIfKEUr127 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAmEMuXoACgkQbDjKyiDZ s5Ll7RAAw19Bgqx4KAD/OEJN+VYXQEI6yg6Y78rk14ks5bjzQJ9Asq3t+HhsxCyx EddzGgfqFGfkql9wXDEDbYFBVRMEZdcD0Zf0zFWVDqmoexXPQxCHQGTK87T1hb0f qKbD3EP2dSv4cGNDejyHGghBcPK4PB+1DbRccJ0WV2a5FHeJ1dP4T3PF7ybRQps5 fHidQxDNkkv1b9AocsxpjXJ2c3LxXDbWGBN+5s/MmCP3ueYoH64MZEbM5EGZEo/g 8/XIDlrrCe3CXYvAxCjjafAw8+3dgrdLvkqmvtUVGb2vDWJgnFRrYP+KU89yT7H1 vZPKxV52nVaO7aM9EuN5bLatSQNgyiQwa02hXz6RbFPTQf5XOpja0Nm/TyNb1aol 7YxUWQpfiCydQdW+lzfa/7Em7rXZldwihDD/69VpKkinppathe2DoqzAr8hVkTFl rwJyEWU5220p5tby5N9QHIQkajx7PvigbhmtLx/t7l3sgGb4wB3Lw2zSd0f739Kh m6Qru1FOEVAW7ELEyD8b75upcT4tRnlDZfjbl5eHu/AyWt/lZoCVT8l9Syblrrl6 nYuzjCbzKGvkeD2wRfAuro7j3dh9VE+PIfUbGDvqmoKH27lJtWMLS2ek3zTEh95k pvi1vc27W18oJ8bUdlpe9G5d6au5U/AhKuRFKkgNqltYjuTHwvU= =o8eD -----END PGP SIGNATURE----- --waHxV1qIfKEUr127--