virtqueue: Use I/O region for pa to va convertion
authorWendy Liang <jliang@xilinx.com>
Wed, 3 Aug 2016 16:46:44 +0000 (09:46 -0700)
committerWendy Liang <jliang@xilinx.com>
Thu, 13 Oct 2016 05:01:46 +0000 (22:01 -0700)
In the virtqueue implementation, use I/O region for the physical
address to virtual address converstion.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/virtio/virtqueue.c

index 8a713b5393c4d4dd2a19daeefdedf62af6e82eca..4025760bf66609127ee177b34d7ff1c7041caf96 100644 (file)
@@ -353,7 +353,7 @@ void *virtqueue_get_available_buffer(struct virtqueue *vq, uint16_t * avail_idx,
 
        atomic_thread_fence(memory_order_seq_cst);
 
-       buffer = env_map_patova(vq->vq_ring.desc[*avail_idx].addr);
+       buffer = metal_io_phys_to_virt(vq->shm_io, vq->vq_ring.desc[*avail_idx].addr);
        *len = vq->vq_ring.desc[*avail_idx].len;
 
        VQUEUE_IDLE(vq);