vhost: export API to translate gpa to vva
[dpdk.git] / lib / librte_vhost / vhost.h
index 68ca197..b5c5046 100644 (file)
@@ -229,25 +229,6 @@ extern uint64_t VHOST_FEATURES;
 #define MAX_VHOST_DEVICE       1024
 extern struct virtio_net *vhost_devices[MAX_VHOST_DEVICE];
 
-/* Convert guest physical Address to host virtual address */
-static inline uint64_t __attribute__((always_inline))
-gpa_to_vva(struct virtio_net *dev, uint64_t gpa)
-{
-       struct rte_vhost_mem_region *reg;
-       uint32_t i;
-
-       for (i = 0; i < dev->mem->nregions; i++) {
-               reg = &dev->mem->regions[i];
-               if (gpa >= reg->guest_phys_addr &&
-                   gpa <  reg->guest_phys_addr + reg->size) {
-                       return gpa - reg->guest_phys_addr +
-                              reg->host_user_addr;
-               }
-       }
-
-       return 0;
-}
-
 /* Convert guest physical address to host physical address */
 static inline phys_addr_t __attribute__((always_inline))
 gpa_to_hpa(struct virtio_net *dev, uint64_t gpa, uint64_t size)