| 63 | } |
| 64 | |
| 65 | static void |
| 66 | vhost_user_iotlb_clear_dump(struct vhost_iotlb_entry *node, |
| 67 | struct vhost_iotlb_entry *prev, struct vhost_iotlb_entry *next) |
| 68 | { |
| 69 | uint64_t start, end; |
| 70 | |
| 71 | start = node->uaddr + node->uoffset; |
| 72 | end = start + node->size; |
| 73 | |
| 74 | /* Skip first page if shared with previous entry. */ |
| 75 | if (vhost_user_iotlb_share_page(prev, node)) |
| 76 | start = RTE_ALIGN_CEIL(start, RTE_BIT64(node->page_shift)); |
| 77 | |
| 78 | /* Skip last page if shared with next entry. */ |
| 79 | if (vhost_user_iotlb_share_page(node, next)) |
| 80 | end = RTE_ALIGN_FLOOR(end, RTE_BIT64(node->page_shift)); |
| 81 | |
| 82 | if (end > start) |
| 83 | mem_set_dump((void *)(uintptr_t)start, end - start, false, |
| 84 | RTE_BIT64(node->page_shift)); |
| 85 | } |
| 86 | |
| 87 | static struct vhost_iotlb_entry * |
| 88 | vhost_user_iotlb_pool_get(struct virtio_net *dev) |
no test coverage detected