Lines Matching full:guest
41 struct guest { struct
52 } guest; argument
78 guest.avail_idx = 0; in alloc_ring()
79 guest.kicked_avail_idx = -1; in alloc_ring()
80 guest.last_used_idx = 0; in alloc_ring()
83 guest.free_head = 0; in alloc_ring()
89 guest.num_free = ring_size; in alloc_ring()
98 /* guest side */
107 if (!guest.num_free) in add_inbuf()
111 head = (ring_size - 1) & (guest.avail_idx++); in add_inbuf()
113 head = guest.free_head; in add_inbuf()
115 guest.num_free--; in add_inbuf()
127 guest.free_head = desc[head].next; in add_inbuf()
135 avail = guest.avail_idx++; in add_inbuf()
142 avail = (ring_size - 1) & (guest.avail_idx++); in add_inbuf()
148 ring.avail->idx = guest.avail_idx; in add_inbuf()
159 head = (ring_size - 1) & guest.last_used_idx; in get_buf()
161 if ((index ^ guest.last_used_idx ^ 0x8000) & ~(ring_size - 1)) in get_buf()
167 if (ring.used->idx == guest.last_used_idx) in get_buf()
172 head = (ring_size - 1) & guest.last_used_idx; in get_buf()
175 head = (ring_size - 1) & guest.last_used_idx; in get_buf()
189 ring.desc[index].next = guest.free_head; in get_buf()
190 guest.free_head = index; in get_buf()
192 guest.num_free++; in get_buf()
193 guest.last_used_idx++; in get_buf()
199 unsigned short last_used_idx = guest.last_used_idx; in used_empty()
219 vring_used_event(&ring) = guest.last_used_idx; in enable_call()
234 guest.avail_idx, in kick_available()
235 guest.kicked_avail_idx); in kick_available()
237 guest.kicked_avail_idx = guest.avail_idx; in kick_available()