From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 14FC91B1B2 for ; Mon, 9 Oct 2017 14:07:52 +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 6A331C04AC6C; Mon, 9 Oct 2017 12:07:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6A331C04AC6C Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.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 293975C3FA; Mon, 9 Oct 2017 12:07:49 +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:34 +0200 Message-Id: <20171009120734.21611-3-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.31]); Mon, 09 Oct 2017 12:07:51 +0000 (UTC) Subject: [dpdk-dev] [PATCH 2/2] fixup! vhost: iommu: Invalidate vring in case of matching IOTLB invalidate 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: , X-List-Received-Date: Mon, 09 Oct 2017 12:07:52 -0000 Signed-off-by: Maxime Coquelin --- lib/librte_vhost/vhost_user.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 363e20245..a37e99d8f 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -1017,18 +1017,18 @@ is_vring_iotlb_invalidate(struct vhost_virtqueue *vq, istart = imsg->iova; iend = istart + imsg->size - 1; - vstart = (uint64_t)vq->desc; + vstart = (uintptr_t)vq->desc; vend = vstart + sizeof(struct vring_desc) * vq->size - 1; if (vstart <= iend && istart <= vend) return 1; - vstart = (uint64_t)vq->avail; + vstart = (uintptr_t)vq->avail; vend = vstart + sizeof(struct vring_avail); vend += sizeof(uint16_t) * vq->size - 1; if (vstart <= iend && istart <= vend) return 1; - vstart = (uint64_t)vq->used; + vstart = (uintptr_t)vq->used; vend = vstart + sizeof(struct vring_used); vend += sizeof(struct vring_used_elem) * vq->size - 1; if (vstart <= iend && istart <= vend) -- 2.13.6