Lines Matching refs:used

50 #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
249 * locks that are also used by the callback. */
309 return vq->avail && vq->desc && vq->used && vhost_vq_access_ok(vq);
319 vq->used = NULL;
457 return sizeof(*vq->used) +
458 sizeof(*vq->used->ring) * num + event;
963 return vhost_copy_to_user(vq, vq->used->ring + idx, head,
971 &vq->used->flags);
978 &vq->used->idx);
1047 return vhost_get_used(vq, *idx, &vq->used->idx);
1302 vring_used_t __user *used)
1312 access_ok(used, vhost_get_used_size(vq, num));
1372 iotlb_access_ok(vq, VHOST_MAP_WO, (u64)(uintptr_t)vq->used,
1416 return vq_access_ok(vq, vq->num, vq->desc, vq->avail, vq->used);
1528 BUILD_BUG_ON(__alignof__ *vq->used > VRING_USED_ALIGN_SIZE);
1544 /* Also validate log access for used ring if enabled. */
1555 vq->used = (void __user *)(unsigned long)a.used_user_addr;
1924 ret = translate_desc(vq, (uintptr_t)vq->used + used_offset,
1977 void __user *used;
1983 /* Log used flag write. */
1984 used = &vq->used->flags;
1985 log_used(vq, (used - (void __user *)vq->used),
1986 sizeof vq->used->flags);
1998 void __user *used;
2002 used = vhost_avail_event(vq);
2003 log_used(vq, (used - (void __user *)vq->used),
2027 !access_ok(&vq->used->idx, sizeof vq->used->idx)) {
2033 vq_err(vq, "Can't access used idx at %p\n",
2034 &vq->used->idx);
2232 vq_err(vq, "Guest moved used index from %u to %u",
2356 /* After we've used one of their buffers, we tell them about it. We'll then
2373 vring_used_elem_t __user *used;
2378 used = vq->used->ring + start;
2380 vq_err(vq, "Failed to write used");
2386 /* Log used ring entry write. */
2387 log_used(vq, ((void __user *)used - (void __user *)vq->used),
2388 count * sizeof *used);
2393 * used index might wrap around. If that happens, invalidate
2401 /* After we've used one of their buffers, we tell them about it. We'll then
2422 vq_err(vq, "Failed to increment used idx");
2426 /* Make sure used idx is seen before log. */
2428 /* Log used index update. */
2430 sizeof vq->used->idx);
2443 /* Flush out used index updates. This is paired
2469 vq_err(vq, "Failed to get used event idx");
2478 /* Signal the Guest tell them we used something up. */
2535 &vq->used->flags, r);
2572 &vq->used->flags, r);