From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAeD5-0002jg-48 for qemu-devel@nongnu.org; Tue, 16 May 2017 11:16:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAeCz-0004Ba-1A for qemu-devel@nongnu.org; Tue, 16 May 2017 11:16:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54176) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dAeCy-0004BN-Nm for qemu-devel@nongnu.org; Tue, 16 May 2017 11:16:20 -0400 Date: Tue, 16 May 2017 18:16:01 +0300 From: "Michael S. Tsirkin" Message-ID: <20170516181455-mutt-send-email-mst@kernel.org> References: <20170511123246.31308-1-maxime.coquelin@redhat.com> <20170511123246.31308-7-maxime.coquelin@redhat.com> <20170511203345-mutt-send-email-mst@kernel.org> <62516ce5-9d4c-d021-c4ab-a767c7f07b31@redhat.com> <20170513025938-mutt-send-email-mst@kernel.org> <9f030e52-60ec-0b42-e0d0-6158eebf99d4@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <9f030e52-60ec-0b42-e0d0-6158eebf99d4@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 6/6] spec/vhost-user spec: Add IOMMU support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: Maxime Coquelin , yuanhan.liu@linux.intel.com, qemu-devel@nongnu.org, peterx@redhat.com, marcandre.lureau@gmail.com, wexu@redhat.com, vkaplans@redhat.com, jfreiman@redhat.com On Mon, May 15, 2017 at 01:45:28PM +0800, Jason Wang wrote: >=20 >=20 > On 2017=E5=B9=B405=E6=9C=8813=E6=97=A5 08:02, Michael S. Tsirkin wrote: > > On Fri, May 12, 2017 at 04:21:58PM +0200, Maxime Coquelin wrote: > > >=20 > > > On 05/11/2017 08:25 PM, Michael S. Tsirkin wrote: > > > > On Thu, May 11, 2017 at 02:32:46PM +0200, Maxime Coquelin wrote: > > > > > This patch specifies and implements the master/slave communicat= ion > > > > > to support device IOTLB in slave. > > > > >=20 > > > > > The vhost_iotlb_msg structure introduced for kernel backends is > > > > > re-used, making the design close between the two backends. > > > > >=20 > > > > > An exception is the use of the secondary channel to enable the > > > > > slave to send IOTLB miss requests to the master. > > > > >=20 > > > > > Signed-off-by: Maxime Coquelin > > > > > --- > > > > > docs/specs/vhost-user.txt | 75 +++++++++++++++++++++++++++++= ++++++++++++++++++ > > > > > hw/virtio/vhost-user.c | 31 ++++++++++++++++++++ > > > > > 2 files changed, 106 insertions(+) > > > > >=20 > > > > > diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.= txt > > > > > index 5fa7016..4a1f0c3 100644 > > > > > --- a/docs/specs/vhost-user.txt > > > > > +++ b/docs/specs/vhost-user.txt > > > > > @@ -97,6 +97,23 @@ Depending on the request type, payload can b= e: > > > > > log offset: offset from start of supplied file descriptor > > > > > where logging starts (i.e. where guest address 0 woul= d be logged) > > > > > + * An IOTLB message > > > > > + --------------------------------------------------------- > > > > > + | iova | size | user address | permissions flags | type | > > > > > + --------------------------------------------------------- > > > > > + > > > > > + IOVA: a 64-bit guest I/O virtual address > > > > guest -> VM > > > Ok. > > >=20 > > > > > + Size: a 64-bit size > > > > How do you specify "all memory"? give special meaning to size 0? > > > Good point, it does not support all memory currently. > > > It is not vhost-user specific, but general to the vhost implementat= ion. > > But iommu needs it to support passthrough. >=20 > Probably not, we will just pass the mappings in vhost_memory_region to > vhost. Its memory_size is also a __u64. >=20 > Thanks That's different since that's chunks of qemu virtual memory. IOMMU maps IOVA to GPA. --=20 MST