Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1374237pxb; Mon, 11 Oct 2021 04:47:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjqzBVGE6vzTHArGwmPoIsKzJrF0I9eSXZpnTELYKd8MLBYuOg2XTXClQXxBAcsdp/nIga X-Received: by 2002:a17:90a:de0b:: with SMTP id m11mr30706475pjv.39.1633952845009; Mon, 11 Oct 2021 04:47:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633952845; cv=none; d=google.com; s=arc-20160816; b=Hgdfiwwv+HbSHJMONjyqcsPzGJYPiSV3o74gbsB7ALO1zX0cLN5hFRrWazE4vUF6TL k2thPIqbT6KNC1hLMioarxyo1mXbhPOWJ3ymtqLAK3CYVNlTU4rE3qPbi1Foz7wNAnQl liqXRYH0yayd7rEAMyVpArQis17fsSds6EZKqPUJ54/HsYA8uUPr1VAGqz7qG7laK21t lKIEGCwBhY0cMAdcu3aFcqLciCwWrNcOd+Y2ZvMnrtdDTFAfg884UVCvoe+R6R/JvRFZ 3fD6jdncaqIpiC1f8KxRw4RxrGwepH12tQDBgJlBHSAo3946if0QH6J28LFSkJLAbVkM 8/7g== 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=6mTyoEeD81UgPE8G1mGEU//Fuq65qBZTt4bSRVKbg+w=; b=reJQA3A+zjSGxZx8Im3Rz1JiVNZWvqXPgLm/geV3FbtnbhEhI3AJlq/19Xo1yRlryl rdTaDo45ThKTcVqQ1t4PVtzmUPpQzDRcOp/iw84oRkv7gWSvzeXqcke8kxvyEBn0NjJ6 C608etJLhgV9jsPkwGChBkJvjDi+q3fgwUZrlsbQCgjf+fvSuyOZ7n4qGXEMOaEl9rV9 p6YGCmSq8VzjBhUYEUFKQ642v7oW+THsEL2R8LPtimsmNit9qW/0GDBPbAsIEv7+t9t7 utc4UXJWS7s3eL5hKBrXKj/3GCfMqUhEfFB2FDrIqfn8h421HMKQNu7UdIup8dzQEm/x c+sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gibson.dropbear.id.au header.s=201602 header.b=Ovs+Na8a; 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 j5si14219215pjs.176.2021.10.11.04.47.12; Mon, 11 Oct 2021 04:47:24 -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=Ovs+Na8a; 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 S234412AbhJKHVy (ORCPT + 99 others); Mon, 11 Oct 2021 03:21:54 -0400 Received: from gandalf.ozlabs.org ([150.107.74.76]:52919 "EHLO gandalf.ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234279AbhJKHVy (ORCPT ); Mon, 11 Oct 2021 03:21:54 -0400 Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4HSVYP2X9Hz4xqQ; Mon, 11 Oct 2021 18:19:53 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1633936793; bh=6mTyoEeD81UgPE8G1mGEU//Fuq65qBZTt4bSRVKbg+w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ovs+Na8a2kRhJXcn14WcB4fglDHKqyAZ8/CQsxyOfabFSpI/zbbDZJwE3j7PULIlS dSMCuiyIYVrWVCN6zc9OEJcA/dKef95nQHaBuR+WNkA4MWDlTuX4a8DC6JODeDtI67 hNoQ9jXaUTAluoawqk65gzodmZtswX8RetSUVLXg= Date: Mon, 11 Oct 2021 16:37:38 +1100 From: "david@gibson.dropbear.id.au" To: Jason Gunthorpe Cc: "Tian, Kevin" , "Liu, Yi L" , "alex.williamson@redhat.com" , "hch@lst.de" , "jasowang@redhat.com" , "joro@8bytes.org" , "jean-philippe@linaro.org" , "parav@mellanox.com" , "lkml@metux.net" , "pbonzini@redhat.com" , "lushenming@huawei.com" , "eric.auger@redhat.com" , "corbet@lwn.net" , "Raj, Ashok" , "yi.l.liu@linux.intel.com" , "Tian, Jun J" , "Wu, Hao" , "Jiang, Dave" , "jacob.jun.pan@linux.intel.com" , "kwankhede@nvidia.com" , "robin.murphy@arm.com" , "kvm@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "dwmw2@infradead.org" , "linux-kernel@vger.kernel.org" , "baolu.lu@linux.intel.com" , "nicolinc@nvidia.com" Subject: Re: [RFC 11/20] iommu/iommufd: Add IOMMU_IOASID_ALLOC/FREE Message-ID: References: <20210919063848.1476776-1-yi.l.liu@intel.com> <20210919063848.1476776-12-yi.l.liu@intel.com> <20210921174438.GW327412@nvidia.com> <20210922140911.GT327412@nvidia.com> <20211001122505.GL964074@nvidia.com> <20211002122542.GW964074@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XAp8YQc7m504M8vp" Content-Disposition: inline In-Reply-To: <20211002122542.GW964074@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --XAp8YQc7m504M8vp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 02, 2021 at 09:25:42AM -0300, Jason Gunthorpe wrote: > On Sat, Oct 02, 2021 at 02:21:38PM +1000, david@gibson.dropbear.id.au wro= te: >=20 > > > > No. qemu needs to supply *both* the 32-bit and 64-bit range to its > > > > guest, and therefore needs to request both from the host. > > >=20 > > > As I understood your remarks each IOAS can only be one of the formats > > > as they have a different PTE layout. So here I ment that qmeu needs to > > > be able to pick *for each IOAS* which of the two formats it is. > >=20 > > No. Both windows are in the same IOAS. A device could do DMA > > simultaneously to both windows. =20 >=20 > Sure, but that doesn't force us to model it as one IOAS in the > iommufd. A while back you were talking about using nesting and 3 > IOAS's, right? >=20 > 1, 2 or 3 IOAS's seems like a decision we can make. Well, up to a point. We can decide how such a thing should be constructed. However at some point there needs to exist an IOAS in which both windows are mapped, whether it's directly or indirectly. That's what the device will be attached to. > PASID support will already require that a device can be multi-bound to > many IOAS's, couldn't PPC do the same with the windows? I don't see how that would make sense. The device has no awareness of multiple windows the way it does of PASIDs. It just sends transactions over the bus with the IOVAs it's told. If those IOVAs lie within one of the windows, the IOMMU picks them up and translates them. If they don't, it doesn't. --=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 --XAp8YQc7m504M8vp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAmFjzaIACgkQbDjKyiDZ s5LujA/+J+md5jc+nVRrvzZTN2GADL6m83rgNracoDm6uMvDRuCivgx8Gb61JAzj 4vdjATq7RrfNZK6OtwjU5TW4OPWr5Q6HltxUR7thLNZYgXdcquJZHtHz4VpddvVb jbdydqJmo2pBy5lMenRlkZM4s8Yj1ERjPsRelh32pFWP4MGbFQaKDgxbypmWSVvT T8eQfFlANqFI6nKKUt0C2vl4i+xHVMSxd+WFcsk1+xue7XI6KsnQ1pNOVJ2lB3Ai +6RSwer5qMA001/lYRmFETyW6+eKZuIFR4RCiq1FdJuJnrcqZSofFErPj6IRDHL7 Dar99VlTQHgVgtrBmFxezRZeBHVQlAdJQgos3VVhL5+o+8KjmusWWxVAKi372cX3 pDGbUyurpqMrYinPewTVeyT0dDOHXfEnYDgGsj+v8SxtIYENPf92AziOx+KNBRlI MCJkh6xQpfgEROvYp7bilA8RqymffYV+rz2sVoGDb8ZfIUeFuNJKqACKN3JIYlZS 6Hk+LH2QZjBwEw+i/hDrmdfYOLD2h0G1wRFJO6HdiVBgV4P+h08RFd874tU1skeR LEYx8SoXpseZuyP45tSblYe7yvnE8cHIjLVHD8H/Aa6kvi4l6FCJeRTANYysWH4s weFKjdEHPGNAi6vo19Hw5IaDJufGkPYq0jZA44jesTI0ejvBfqY= =xnee -----END PGP SIGNATURE----- --XAp8YQc7m504M8vp--