From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: yliu@fridaylinux.org, dev@dpdk.org
Cc: thomas@monjalon.net, Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [dpdk-dev] [PATCH 1/2] fixup! vhost-user: iommu: postpone device creation until ring are mapped
Date: Mon, 9 Oct 2017 14:07:33 +0200 [thread overview]
Message-ID: <20171009120734.21611-2-maxime.coquelin@redhat.com> (raw)
In-Reply-To: <20171009120734.21611-1-maxime.coquelin@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
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)
--
2.13.6
next prev parent reply other threads:[~2017-10-09 12:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 12:07 [dpdk-dev] [PATCH 0/2] Vhost-user IOMMU support pull-request fixes Maxime Coquelin
2017-10-09 12:07 ` Maxime Coquelin [this message]
2017-10-09 12:07 ` [dpdk-dev] [PATCH 2/2] fixup! vhost: iommu: Invalidate vring in case of matching IOTLB invalidate Maxime Coquelin
2017-10-10 2:31 ` [dpdk-dev] [PATCH 0/2] Vhost-user IOMMU support pull-request fixes Yuanhan Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171009120734.21611-2-maxime.coquelin@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
--cc=yliu@fridaylinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).