• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/usr.sbin/bhyve/

Lines Matching refs:vq

97 	struct vqueue_info *vq;
104 for (vq = vs->vs_queues, i = 0; i < nvq; vq++, i++) {
105 vq->vq_flags = 0;
106 vq->vq_last_avail = 0;
107 vq->vq_next_used = 0;
108 vq->vq_save_used = 0;
109 vq->vq_pfn = 0;
110 vq->vq_msix_idx = VIRTIO_MSI_NO_VECTOR;
177 struct vqueue_info *vq;
182 vq = &vs->vs_queues[vs->vs_curq];
183 vq->vq_pfn = pfn;
185 size = vring_size(vq->vq_qsize);
189 vq->vq_desc = (struct virtio_desc *)base;
190 base += vq->vq_qsize * sizeof(struct virtio_desc);
193 vq->vq_avail = (struct vring_avail *)base;
194 base += (2 + vq->vq_qsize + 1) * sizeof(uint16_t);
200 vq->vq_used = (struct vring_used *)base;
203 vq->vq_flags = VQ_ALLOC;
204 vq->vq_last_avail = 0;
205 vq->vq_next_used = 0;
206 vq->vq_save_used = 0;
266 vq_getchain(struct vqueue_info *vq, uint16_t *pidx,
277 vs = vq->vq_vs;
282 * update vq->vq_avail->va_idx until all of the descriptors
288 * since the last time we updated vq->vq_last_avail.
293 idx = vq->vq_last_avail;
294 ndesc = (uint16_t)((u_int)vq->vq_avail->va_idx - idx);
297 if (ndesc > vq->vq_qsize) {
314 *pidx = next = vq->vq_avail->va_ring[idx & (vq->vq_qsize - 1)];
315 vq->vq_last_avail++;
317 if (next >= vq->vq_qsize) {
324 vdir = &vq->vq_desc[next];
395 vq_retchains(struct vqueue_info *vq, uint16_t n_chains)
398 vq->vq_last_avail -= n_chains;
402 vq_relchain_prepare(struct vqueue_info *vq, uint16_t idx, uint32_t iolen)
417 mask = vq->vq_qsize - 1;
418 vuh = vq->vq_used;
420 vue = &vuh->vu_ring[vq->vq_next_used++ & mask];
426 vq_relchain_publish(struct vqueue_info *vq)
434 vq->vq_used->vu_idx = vq->vq_next_used;
445 vq_relchain(struct vqueue_info *vq, uint16_t idx, uint32_t iolen)
447 vq_relchain_prepare(vq, idx, iolen);
448 vq_relchain_publish(vq);
467 vq_endchains(struct vqueue_info *vq, int used_all_avail)
482 vs = vq->vq_vs;
483 old_idx = vq->vq_save_used;
484 vq->vq_save_used = new_idx = vq->vq_used->vu_idx;
496 event_idx = VQ_USED_EVENT_IDX(vq);
505 !(vq->vq_avail->va_flags & VRING_AVAIL_F_NO_INTERRUPT);
508 vq_interrupt(vs, vq);
681 struct vqueue_info *vq;
775 vq = &vs->vs_queues[value];
776 if (vq->vq_notify)
777 (*vq->vq_notify)(DEV_SOFTC(vs), vq);
779 (*vc->vc_qnotify)(DEV_SOFTC(vs), vq);
782 "%s: qnotify queue %d: missing vq/vc notify",
796 vq = &vs->vs_queues[vs->vs_curq];
797 vq->vq_msix_idx = value;
879 struct vqueue_info *vq;
886 vq = &vs->vs_queues[i];
888 SNAPSHOT_VAR_CMP_OR_LEAVE(vq->vq_qsize, meta, ret, done);
889 SNAPSHOT_VAR_CMP_OR_LEAVE(vq->vq_num, meta, ret, done);
891 SNAPSHOT_VAR_OR_LEAVE(vq->vq_flags, meta, ret, done);
892 SNAPSHOT_VAR_OR_LEAVE(vq->vq_last_avail, meta, ret, done);
893 SNAPSHOT_VAR_OR_LEAVE(vq->vq_next_used, meta, ret, done);
894 SNAPSHOT_VAR_OR_LEAVE(vq->vq_save_used, meta, ret, done);
895 SNAPSHOT_VAR_OR_LEAVE(vq->vq_msix_idx, meta, ret, done);
897 SNAPSHOT_VAR_OR_LEAVE(vq->vq_pfn, meta, ret, done);
899 addr_size = vq->vq_qsize * sizeof(struct virtio_desc);
900 SNAPSHOT_GUEST2HOST_ADDR_OR_LEAVE(vq->vq_desc, addr_size,
903 addr_size = (2 + vq->vq_qsize + 1) * sizeof(uint16_t);
904 SNAPSHOT_GUEST2HOST_ADDR_OR_LEAVE(vq->vq_avail, addr_size,
907 addr_size = (2 + 2 * vq->vq_qsize + 1) * sizeof(uint16_t);
908 SNAPSHOT_GUEST2HOST_ADDR_OR_LEAVE(vq->vq_used, addr_size,
911 SNAPSHOT_BUF_OR_LEAVE(vq->vq_desc, vring_size(vq->vq_qsize),