dm: virtio: bugfix for polling mode

In vxworks, virtio-console FE driver only initiate 2 virtqueues, but BE
creates 2+ virtqueues for it. So the rest of the virtqueues are not
initiated. vq->used->flags cannot be used directly without any
condition.

Tracked-On: #3203
Signed-off-by: Gao Junhao <junhao.gao@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
Gao Junhao 2019-05-30 11:47:04 +00:00 committed by ACRN System Integration
parent 4c09051c7b
commit 286dd180a7

View File

@ -86,6 +86,8 @@ virtio_poll_timer(void *arg, uint64_t nexp)
for (i = 0; i < base->vops->nvq; i++) {
vq = &base->queues[i];
if(!vq_ring_ready(vq))
continue;
vq->used->flags |= VRING_USED_F_NO_NOTIFY;
/* TODO: call notify when necessary */
if (vq->notify)