Exemplo n.º 1
0
void
virtqueue_notify(struct virtqueue *vq)
{

	/* Ensure updated avail->idx is visible to host. */
	mb();

	if (vq_ring_must_notify_host(vq))
		vq_ring_notify_host(vq);
	vq->vq_queued_cnt = 0;
}
Exemplo n.º 2
0
void
virtqueue_notify(struct virtqueue *vq, lwkt_serialize_t interlock)
{
	/* Ensure updated avail->idx is visible to host. */
	cpu_mfence();

	if (vq_ring_must_notify_host(vq)) {
		lwkt_serialize_exit(interlock);
		vq_ring_notify_host(vq);
		lwkt_serialize_enter(interlock);
	}
	vq->vq_queued_cnt = 0;
}
Exemplo n.º 3
0
/**
 * virtqueue_kick - Notifies other side that there is buffer available for it.
 *
 * @param vq      - Pointer to VirtIO queue control block
 */
void virtqueue_kick(struct virtqueue *vq)
{

	VQUEUE_BUSY(vq);

	/* Ensure updated avail->idx is visible to host. */
	env_mb();

	if (vq_ring_must_notify_host(vq))
		vq_ring_notify_host(vq);

	vq->vq_queued_cnt = 0;

	VQUEUE_IDLE(vq);
}