MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ring_addr_to_vva

Function ring_addr_to_vva

dpdk/lib/vhost/vhost_user.c:716–732  ·  view source on GitHub ↗

* Converts ring address to Vhost virtual address. * If IOMMU is enabled, the ring address is a guest IO virtual address, * else it is a QEMU virtual address. */

Source from the content-addressed store, hash-verified

714 * else it is a QEMU virtual address.
715 */
716static uint64_t
717ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
718 uint64_t ra, uint64_t *size)
719{
720 if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) {
721 uint64_t vva;
722
723 vhost_user_iotlb_rd_lock(vq);
724 vva = vhost_iova_to_vva(dev, vq, ra,
725 size, VHOST_ACCESS_RW);
726 vhost_user_iotlb_rd_unlock(vq);
727
728 return vva;
729 }
730
731 return qva_to_vva(dev, ra, size);
732}
733
734static uint64_t
735log_addr_to_gpa(struct virtio_net *dev, struct vhost_virtqueue *vq)

Callers 1

translate_ring_addressesFunction · 0.85

Calls 1

qva_to_vvaFunction · 0.85

Tested by

no test coverage detected