/* After we've used one of their buffers, we tell the Guest about it. Sometime later we'll want to send them an interrupt using trigger_irq(); note that wait_for_vq_desc() does that for us if it has to wait.  */
static void add_used(struct virtqueue *vq, unsigned int head, int len)
/* After we've used one of their buffers, we tell the Guest about it. Sometime later we'll want to send them an interrupt using trigger_irq(); note that wait_for_vq_desc() does that for us if it has to wait.  */
static void add_used(struct virtqueue *vq, unsigned int head, int len)
{
	struct vring_used_elem *used;
	used = &vq->vring.used->ring[vq->vring.used->idx % vq->vring.num];
	used->id = head;
	used->len = len;
	wmb();
	vq->vring.used->idx++;
	vq->pending_used++;
}