Lines Matching +full:guest +full:- +full:side
1 /* SPDX-License-Identifier: BSD-3-Clause */
16 /* This marks a buffer as write-only (otherwise read-only) */
22 * The Host uses this in used->flags to advise the Guest: don't kick me when
23 * you add a buffer. It's unreliable, so it's simply an optimization. Guest
29 * The Guest uses this in avail->flags to advise the Host: don't interrupt me
38 * The Guest publishes the used index for which it expects an interrupt
39 * at the end of the avail ring. Host should ignore the avail->flags field.
42 * at the end of the used ring. Guest should ignore the used->flags field.
48 /* Address (guest-physical) */
85 * virtqueue - a queue to register buffers for sending or receiving.
89 * @index: the zero-based ordinal number for this queue
96 * @avail_flags_shadow: last written value to avail->flags
97 * @avail_idx_shadow: last written value to avail->idx in guest byte order
115 * When using pre-virtio 1.0 layout, these fall out naturally.
125 #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num])
126 #define vring_avail_event(vr) (*(__virtio16 *)&(vr)->used->ring[(vr)->num])
131 vr->num = num; in vring_init()
132 vr->desc = p; in vring_init()
133 vr->avail = p + num * sizeof(struct vring_desc); in vring_init()
134 vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + in vring_init()
135 sizeof(__virtio16) + align - 1) & ~(align - 1)); in vring_init()
141 sizeof(__virtio16) * (3 + num) + align - 1) & ~(align - 1)) + in vring_size()
147 * Assuming a given event_idx value from the other side, if we have just
153 * Note: Xen has similar logic for notification hold-off in vring_need_event()
159 return (__u16)(new_idx - event_idx - 1) < (__u16)(new_idx - old); in vring_need_event()
165 * virtqueue_add - expose buffers to other end
169 * @out_sgs: the number of scatterlists readable by other side
182 * virtqueue_kick - update after add_buf
187 * the other side.
195 * virtqueue_get_buf - get the next used buffer
214 * vring_create_virtqueue - create a virtqueue for a virtio device
234 * vring_del_virtqueue - destroy a virtqueue
247 * virtqueue_get_vring_size - get the size of the virtqueue's vring
255 * virtqueue_get_desc_addr - get the vring descriptor table address
263 * virtqueue_get_avail_addr - get the vring available ring address
271 * virtqueue_get_used_addr - get the vring used ring address
279 * virtqueue_poll - query pending used buffers
289 * virtqueue_dump - dump the virtqueue for debugging
299 * Barriers in virtio are tricky. Since we are not in a hyperviosr/guest