From patchwork Mon Oct 9 12:07:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 29940 X-Patchwork-Delegate: yuanhan.liu@linux.intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 52FE51B1ED; Mon, 9 Oct 2017 14:07:53 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 6B5C81B1EB for ; Mon, 9 Oct 2017 14:07:50 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BCDD27E439; Mon, 9 Oct 2017 12:07:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BCDD27E439 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=maxime.coquelin@redhat.com Received: from localhost.localdomain (ovpn-112-42.ams2.redhat.com [10.36.112.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8860B5C3FA; Mon, 9 Oct 2017 12:07:48 +0000 (UTC) From: Maxime Coquelin To: yliu@fridaylinux.org, dev@dpdk.org Cc: thomas@monjalon.net, Maxime Coquelin Date: Mon, 9 Oct 2017 14:07:33 +0200 Message-Id: <20171009120734.21611-2-maxime.coquelin@redhat.com> In-Reply-To: <20171009120734.21611-1-maxime.coquelin@redhat.com> References: <20171009120734.21611-1-maxime.coquelin@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 09 Oct 2017 12:07:49 +0000 (UTC) Subject: [dpdk-dev] [PATCH 1/2] fixup! vhost-user: iommu: postpone device creation until ring are mapped X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Maxime Coquelin --- lib/librte_vhost/vhost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index e1f75feca..cbccf2390 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -144,7 +144,7 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq) goto out; size = sizeof(struct vring_desc) * vq->size; - vq->desc = (struct vring_desc *)vhost_iova_to_vva(dev, vq, + vq->desc = (struct vring_desc *)(uintptr_t)vhost_iova_to_vva(dev, vq, vq->ring_addrs.desc_user_addr, size, VHOST_ACCESS_RW); if (!vq->desc) @@ -152,7 +152,7 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq) size = sizeof(struct vring_avail); size += sizeof(uint16_t) * vq->size; - vq->avail = (struct vring_avail *)vhost_iova_to_vva(dev, vq, + vq->avail = (struct vring_avail *)(uintptr_t)vhost_iova_to_vva(dev, vq, vq->ring_addrs.avail_user_addr, size, VHOST_ACCESS_RW); if (!vq->avail) @@ -160,7 +160,7 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq) size = sizeof(struct vring_used); size += sizeof(struct vring_used_elem) * vq->size; - vq->used = (struct vring_used *)vhost_iova_to_vva(dev, vq, + vq->used = (struct vring_used *)(uintptr_t)vhost_iova_to_vva(dev, vq, vq->ring_addrs.used_user_addr, size, VHOST_ACCESS_RW); if (!vq->used)