From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2Y7V-0003Th-IQ for qemu-devel@nongnu.org; Fri, 04 Nov 2016 02:36:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2Y7U-0003w6-Pa for qemu-devel@nongnu.org; Fri, 04 Nov 2016 02:36:57 -0400 References: <1478165243-4767-1-git-send-email-jasowang@redhat.com> <1478165243-4767-3-git-send-email-jasowang@redhat.com> <20161103214216-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: <69a6542d-377e-b6e6-d462-577157858c97@redhat.com> Date: Fri, 4 Nov 2016 14:36:36 +0800 MIME-Version: 1.0 In-Reply-To: <20161103214216-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V2 02/11] virtio: convert to use DMA api List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: peterx@redhat.com, wexu@redhat.com, qemu-devel@nongnu.org, vkaplans@redhat.com, pbonzini@redhat.com, cornelia.huck@de.ibm.com, Stefan Hajnoczi , Kevin Wolf , Amit Shah , qemu-block@nongnu.org On 2016=E5=B9=B411=E6=9C=8804=E6=97=A5 03:46, Michael S. Tsirkin wrote: >> @@ -244,6 +245,7 @@ int virtio_queue_empty(VirtQueue *vq) >> > static void virtqueue_unmap_sg(VirtQueue *vq, const VirtQueueElemen= t *elem, >> > unsigned int len) >> > { >> >+ AddressSpace *dma_as =3D virtio_get_dma_as(vq->vdev); >> > unsigned int offset; >> > int i; > Can't we use > > vdev->dma_as > > here? > > I'd like to avoid query on data path. > > Same in most other places below. > > Will use vdev->dma_as in next version. Thanks