search for: virtio_find_vqs

Displaying 20 results from an estimated 135 matches for "virtio_find_vqs".

2017 Mar 29
5
[PATCH 1/6] virtio: wrap find_vqs
...a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -455,8 +455,7 @@ static int init_vq(struct virtio_blk *vblk) } /* Discover virtqueues and write information to configuration. */ - err = vdev->config->find_vqs(vdev, num_vqs, vqs, callbacks, names, - &desc); + err = virtio_find_vqs(vdev, num_vqs, vqs, callbacks, names, &desc); if (err) goto out; diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index e9b7e0b..5da4c8e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1945,9 +1945,9 @@ static int init_vqs(stru...
2017 Mar 29
5
[PATCH 1/6] virtio: wrap find_vqs
...a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -455,8 +455,7 @@ static int init_vq(struct virtio_blk *vblk) } /* Discover virtqueues and write information to configuration. */ - err = vdev->config->find_vqs(vdev, num_vqs, vqs, callbacks, names, - &desc); + err = virtio_find_vqs(vdev, num_vqs, vqs, callbacks, names, &desc); if (err) goto out; diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index e9b7e0b..5da4c8e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1945,9 +1945,9 @@ static int init_vqs(stru...
2017 Mar 29
2
[PATCH 4/6] virtio_net: allow specifying context for rx
...any */ if (vi->has_cvq) { @@ -2077,9 +2085,12 @@ static int virtnet_find_vqs(struct virtnet_info *vi) sprintf(vi->sq[i].name, "output.%d", i); names[rxq2vq(i)] = vi->rq[i].name; names[txq2vq(i)] = vi->sq[i].name; + if (ctx) + ctx[rxq2vq(i)] = true; } - ret = virtio_find_vqs(vi->vdev, total_vqs, vqs, callbacks, names, NULL); + ret = vi->vdev->config->find_vqs(vi->vdev, total_vqs, vqs, callbacks, + names, ctx, NULL); if (ret) goto err_find; @@ -2101,6 +2112,8 @@ static int virtnet_find_vqs(struct virtnet_info *vi) return 0; err_find: + kf...
2017 Mar 29
2
[PATCH 4/6] virtio_net: allow specifying context for rx
...any */ if (vi->has_cvq) { @@ -2077,9 +2085,12 @@ static int virtnet_find_vqs(struct virtnet_info *vi) sprintf(vi->sq[i].name, "output.%d", i); names[rxq2vq(i)] = vi->rq[i].name; names[txq2vq(i)] = vi->sq[i].name; + if (ctx) + ctx[rxq2vq(i)] = true; } - ret = virtio_find_vqs(vi->vdev, total_vqs, vqs, callbacks, names, NULL); + ret = vi->vdev->config->find_vqs(vi->vdev, total_vqs, vqs, callbacks, + names, ctx, NULL); if (ret) goto err_find; @@ -2101,6 +2112,8 @@ static int virtnet_find_vqs(struct virtnet_info *vi) return 0; err_find: + kf...
2009 Jun 01
2
find_vqs operation starting at arbitrary index
...can have queues hot-plugged at run-time. This can be made to work by passing the 'start_index' value as was done earlier for find_vq, but I doubt something like the following will work. The MSI vectors might need some changing as well. If this indeed is the right way to do it, I can add a virtio_find_vqs helper along similar lines as virtio_find_single_vq and pass '0' as the start index to the ->find_vqs operation. Or is there another way to do it? diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 193c8f0..cb3f8df 100644 --- a/drivers/virtio/virtio_pci.c +++...
2009 Jun 01
2
find_vqs operation starting at arbitrary index
...can have queues hot-plugged at run-time. This can be made to work by passing the 'start_index' value as was done earlier for find_vq, but I doubt something like the following will work. The MSI vectors might need some changing as well. If this indeed is the right way to do it, I can add a virtio_find_vqs helper along similar lines as virtio_find_single_vq and pass '0' as the start index to the ->find_vqs operation. Or is there another way to do it? diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 193c8f0..cb3f8df 100644 --- a/drivers/virtio/virtio_pci.c +++...
2019 Oct 18
2
[PATCH] drm/virtio: print a single line with device features
...vgdev->vdev, VIRTIO_GPU_F_EDID)) { vgdev->has_edid = true; - DRM_INFO("EDID support available.\n"); } + DRM_INFO("features: %cvirgl %cedid\n", + vgdev->has_virgl_3d ? '+' : '-', + vgdev->has_edid ? '+' : '-'); + ret = virtio_find_vqs(vgdev->vdev, 2, vqs, callbacks, names, NULL); if (ret) { DRM_ERROR("failed to find virt queues\n"); -- 2.18.1
2019 Oct 18
2
[PATCH] drm/virtio: print a single line with device features
...vgdev->vdev, VIRTIO_GPU_F_EDID)) { vgdev->has_edid = true; - DRM_INFO("EDID support available.\n"); } + DRM_INFO("features: %cvirgl %cedid\n", + vgdev->has_virgl_3d ? '+' : '-', + vgdev->has_edid ? '+' : '-'); + ret = virtio_find_vqs(vgdev->vdev, 2, vqs, callbacks, names, NULL); if (ret) { DRM_ERROR("failed to find virt queues\n"); -- 2.18.1
2017 Mar 30
1
[PATCH 4/6] virtio_net: allow specifying context for rx
...qs(struct virtnet_info *vi) > > sprintf(vi->sq[i].name, "output.%d", i); > > names[rxq2vq(i)] = vi->rq[i].name; > > names[txq2vq(i)] = vi->sq[i].name; > > + if (ctx) > > + ctx[rxq2vq(i)] = true; > > } > > > > - ret = virtio_find_vqs(vi->vdev, total_vqs, vqs, callbacks, names, NULL); > > + ret = vi->vdev->config->find_vqs(vi->vdev, total_vqs, vqs, callbacks, > > + names, ctx, NULL); > > virtio_find_vqs_ctx()? (Needs to be exported, obviously.) I guess I can do that but there's a singl...
2017 Mar 30
1
[PATCH 4/6] virtio_net: allow specifying context for rx
...qs(struct virtnet_info *vi) > > sprintf(vi->sq[i].name, "output.%d", i); > > names[rxq2vq(i)] = vi->rq[i].name; > > names[txq2vq(i)] = vi->sq[i].name; > > + if (ctx) > > + ctx[rxq2vq(i)] = true; > > } > > > > - ret = virtio_find_vqs(vi->vdev, total_vqs, vqs, callbacks, names, NULL); > > + ret = vi->vdev->config->find_vqs(vi->vdev, total_vqs, vqs, callbacks, > > + names, ctx, NULL); > > virtio_find_vqs_ctx()? (Needs to be exported, obviously.) I guess I can do that but there's a singl...
2018 Jan 16
1
[RFC PATCH v2 3/5] iommu/virtio-iommu: Add event queue
..._virtio(viommu->dev); > - const char *name = "request"; > - void *ret; > + const char *names[] = { "request", "event" }; > + vq_callback_t *callbacks[] = { > + NULL, /* No async requests */ > + viommu_event_handler, > + }; > + > + return virtio_find_vqs(vdev, VIOMMU_NUM_VQS, viommu->vqs, callbacks, > + names, NULL); > +} > > - ret = virtio_find_single_vq(vdev, NULL, name); > - if (IS_ERR(ret)) { > - dev_err(viommu->dev, "cannot find VQ\n"); > - return PTR_ERR(ret); > +static int viommu_fill_evtq...
2017 Mar 30
0
[PATCH 4/6] virtio_net: allow specifying context for rx
...,9 +2085,12 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > sprintf(vi->sq[i].name, "output.%d", i); > names[rxq2vq(i)] = vi->rq[i].name; > names[txq2vq(i)] = vi->sq[i].name; > + if (ctx) > + ctx[rxq2vq(i)] = true; > } > > - ret = virtio_find_vqs(vi->vdev, total_vqs, vqs, callbacks, names, NULL); > + ret = vi->vdev->config->find_vqs(vi->vdev, total_vqs, vqs, callbacks, > + names, ctx, NULL); virtio_find_vqs_ctx()? (Needs to be exported, obviously.) > if (ret) > goto err_find; > > @@ -2101,6 +21...
2019 Oct 22
0
[PATCH 1/5] drm/virtio: print a single line with device features
...vgdev->vdev, VIRTIO_GPU_F_EDID)) { vgdev->has_edid = true; - DRM_INFO("EDID support available.\n"); } + DRM_INFO("features: %cvirgl %cedid\n", + vgdev->has_virgl_3d ? '+' : '-', + vgdev->has_edid ? '+' : '-'); + ret = virtio_find_vqs(vgdev->vdev, 2, vqs, callbacks, names, NULL); if (ret) { DRM_ERROR("failed to find virt queues\n"); -- 2.18.1
2019 Oct 22
0
[PATCH] drm/virtio: print a single line with device features
...#39; : '-', > + vgdev->has_edid ? '+' : '-'); Maybe we should move the various yesno/onoff/enableddisabled helpers from i915_utils.h to drm_utils.h and use them more widely? Anyway Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch> > + > ret = virtio_find_vqs(vgdev->vdev, 2, vqs, callbacks, names, NULL); > if (ret) { > DRM_ERROR("failed to find virt queues\n"); > -- > 2.18.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
2018 Dec 27
2
[PATCH v37 1/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...L if the related feature is not enabled, which will > + * cause no allocation for the corresponding virtqueue in find_vqs. > */ This might be true for virtio-pci, but it is not for virtio-ccw. > - nvqs = virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ) ? 3 : 2; > - err = virtio_find_vqs(vb->vdev, nvqs, vqs, callbacks, names, NULL); > + callbacks[VIRTIO_BALLOON_VQ_INFLATE] = balloon_ack; > + names[VIRTIO_BALLOON_VQ_INFLATE] = "inflate"; > + callbacks[VIRTIO_BALLOON_VQ_DEFLATE] = balloon_ack; > + names[VIRTIO_BALLOON_VQ_DEFLATE] = "deflate"; > +...
2018 Dec 27
2
[PATCH v37 1/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...L if the related feature is not enabled, which will > + * cause no allocation for the corresponding virtqueue in find_vqs. > */ This might be true for virtio-pci, but it is not for virtio-ccw. > - nvqs = virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ) ? 3 : 2; > - err = virtio_find_vqs(vb->vdev, nvqs, vqs, callbacks, names, NULL); > + callbacks[VIRTIO_BALLOON_VQ_INFLATE] = balloon_ack; > + names[VIRTIO_BALLOON_VQ_INFLATE] = "inflate"; > + callbacks[VIRTIO_BALLOON_VQ_DEFLATE] = balloon_ack; > + names[VIRTIO_BALLOON_VQ_DEFLATE] = "deflate"; > +...
2018 Jan 17
2
[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...allbacks[i] = stats_request; > + names[i] = "stats"; > + i++; > + } > > - /* > - * We expect two virtqueues: inflate and deflate, and > - * optionally stat. > - */ > - nvqs = virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ) ? 3 : 2; > - err = virtio_find_vqs(vb->vdev, nvqs, vqs, callbacks, names, NULL); > + if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_FREE_PAGE_VQ)) { > + callbacks[i] = NULL; > + names[i] = "free_page_vq"; > + } > + > + err = vb->vdev->config->find_vqs(vb->vdev, nvqs, vqs, callbacks,...
2018 Jan 17
2
[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...allbacks[i] = stats_request; > + names[i] = "stats"; > + i++; > + } > > - /* > - * We expect two virtqueues: inflate and deflate, and > - * optionally stat. > - */ > - nvqs = virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ) ? 3 : 2; > - err = virtio_find_vqs(vb->vdev, nvqs, vqs, callbacks, names, NULL); > + if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_FREE_PAGE_VQ)) { > + callbacks[i] = NULL; > + names[i] = "free_page_vq"; > + } > + > + err = vb->vdev->config->find_vqs(vb->vdev, nvqs, vqs, callbacks,...
2018 Nov 15
0
[PATCH v4 7/7] iommu/virtio: Add event queue
...;request", "event" }; + vq_callback_t *callbacks[] = { + NULL, /* No async requests */ + viommu_event_handler, + }; - ret = virtio_find_single_vq(vdev, NULL, name); - if (IS_ERR(ret)) { - dev_err(viommu->dev, "cannot find VQ\n"); - return PTR_ERR(ret); - } + return virtio_find_vqs(vdev, VIOMMU_NR_VQS, viommu->vqs, callbacks, + names, NULL); +} - viommu->vqs[VIOMMU_REQUEST_VQ] = ret; +static int viommu_fill_evtq(struct viommu_dev *viommu) +{ + int i, ret; + struct scatterlist sg[1]; + struct viommu_event *evts; + struct virtqueue *vq = viommu->vqs[VIOMMU_E...
2018 Sep 13
0
[PATCH 3/3] drm/virtio: add edid support
...ver_load(struct drm_device *dev, unsigned long flags) #else DRM_INFO("virgl 3d acceleration not supported by guest\n"); #endif + if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_EDID)) { + vgdev->has_edid = true; + DRM_INFO("EDID support available.\n"); + } ret = virtio_find_vqs(vgdev->vdev, 2, vqs, callbacks, names, NULL); if (ret) { @@ -219,6 +225,8 @@ int virtio_gpu_driver_load(struct drm_device *dev, unsigned long flags) if (num_capsets) virtio_gpu_get_capsets(vgdev, num_capsets); + if (vgdev->has_edid) + virtio_gpu_cmd_get_edids(vgdev); virtio_gpu_cm...