| 265 | } |
| 266 | |
| 267 | void |
| 268 | __vhost_log_cache_write(struct virtio_net *dev, struct vhost_virtqueue *vq, |
| 269 | uint64_t addr, uint64_t len) |
| 270 | { |
| 271 | uint64_t page; |
| 272 | |
| 273 | if (unlikely(!dev->log_base || !len)) |
| 274 | return; |
| 275 | |
| 276 | if (unlikely(dev->log_size <= ((addr + len - 1) / VHOST_LOG_PAGE / 8))) |
| 277 | return; |
| 278 | |
| 279 | page = addr / VHOST_LOG_PAGE; |
| 280 | while (page * VHOST_LOG_PAGE < addr + len) { |
| 281 | vhost_log_cache_page(dev, vq, page); |
| 282 | page += 1; |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | void |
| 287 | __vhost_log_cache_write_iova(struct virtio_net *dev, struct vhost_virtqueue *vq, |
no test coverage detected