Displaying 20 results from an estimated 41 matches for "vdpa_register_device".
2020 Apr 13
0
[PATCH] vdpa: fix comment of vdpa_register_device()
...;
---
drivers/vdpa/vdpa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c
index e9ed6a2b635b..ff6562f602e0 100644
--- a/drivers/vdpa/vdpa.c
+++ b/drivers/vdpa/vdpa.c
@@ -116,7 +116,7 @@ EXPORT_SYMBOL_GPL(__vdpa_alloc_device);
/**
* vdpa_register_device - register a vDPA device
- * Callers must have a succeed call of vdpa_init_device() before.
+ * Callers must have a succeed call of vdpa_alloc_device() before.
* @vdev: the vdpa device to be registered to vDPA bus
*
* Returns an error when fail to add to vDPA bus
--
2.20.1
2020 Feb 11
2
[PATCH V2 3/5] vDPA: introduce vDPA bus
On Mon, Feb 10, 2020 at 11:56:06AM +0800, Jason Wang wrote:
> +/**
> + * vdpa_register_device - register a vDPA device
> + * Callers must have a succeed call of vdpa_init_device() before.
> + * @vdev: the vdpa device to be registered to vDPA bus
> + *
> + * Returns an error when fail to add to vDPA bus
> + */
> +int vdpa_register_device(struct vdpa_device *vdev)
> +{
&g...
2020 Feb 11
2
[PATCH V2 3/5] vDPA: introduce vDPA bus
On Mon, Feb 10, 2020 at 11:56:06AM +0800, Jason Wang wrote:
> +/**
> + * vdpa_register_device - register a vDPA device
> + * Callers must have a succeed call of vdpa_init_device() before.
> + * @vdev: the vdpa device to be registered to vDPA bus
> + *
> + * Returns an error when fail to add to vDPA bus
> + */
> +int vdpa_register_device(struct vdpa_device *vdev)
> +{
&g...
2020 Feb 10
0
[PATCH V2 3/5] vDPA: introduce vDPA bus
...vdev);
+
+ return 0;
+}
+
+static struct bus_type vdpa_bus = {
+ .name = "vdpa",
+ .probe = vdpa_dev_probe,
+ .remove = vdpa_dev_remove,
+};
+
+/**
+ * vdpa_init_device - initilaize a vDPA device
+ * This allows driver to some prepartion between after device is
+ * initialized but before vdpa_register_device()
+ * @vdev: the vdpa device to be initialized
+ * @parent: the paretn device
+ * @dma_dev: the actual device that is performing DMA
+ * @config: the bus operations support by this device
+ *
+ * Returns an error when parent/config/dma_dev is not set or fail to get
+ * ida.
+ */
+int vdpa_init_devi...
2020 Feb 12
0
[PATCH V2 3/5] vDPA: introduce vDPA bus
On 2020/2/11 ??9:47, Jason Gunthorpe wrote:
> On Mon, Feb 10, 2020 at 11:56:06AM +0800, Jason Wang wrote:
>> +/**
>> + * vdpa_register_device - register a vDPA device
>> + * Callers must have a succeed call of vdpa_init_device() before.
>> + * @vdev: the vdpa device to be registered to vDPA bus
>> + *
>> + * Returns an error when fail to add to vDPA bus
>> + */
>> +int vdpa_register_device(struct vdpa_...
2020 Feb 11
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...= &vdpa->dev;
> + dev->coherent_dma_mask = DMA_BIT_MASK(64);
> + set_dma_ops(dev, &vdpasim_dma_ops);
> +
> + ret = vdpa_init_device(vdpa, &vdpasim_dev->dev, dev,
> + &vdpasim_net_config_ops);
> + if (ret)
> + goto err_init;
> +
> + ret = vdpa_register_device(vdpa);
> + if (ret)
> + goto err_register;
See? This error unwind is now all wrong:
> +
> + return vdpasim;
> +
> +err_register:
> + put_device(&vdpa->dev);
Double put_device
> +err_init:
> + vhost_iotlb_free(vdpasim->iommu);
> +err_iotlb:
> + kfree(v...
2020 Feb 20
0
[PATCH V3 3/5] vDPA: introduce vDPA bus
...p;vdev->dev);
+
+ vdev->index = err;
+ vdev->dma_dev = dma_dev;
+ vdev->config = config;
+
+ dev_set_name(&vdev->dev, "vdpa%u", vdev->index);
+
+ return vdev;
+
+err_ida:
+ kfree(vdev);
+err:
+ return ERR_PTR(err);
+}
+EXPORT_SYMBOL_GPL(vdpa_alloc_device);
+
+/**
+ * vdpa_register_device - register a vDPA device
+ * Callers must have a succeed call of vdpa_init_device() before.
+ * @vdev: the vdpa device to be registered to vDPA bus
+ *
+ * Returns an error when fail to add to vDPA bus
+ */
+int vdpa_register_device(struct vdpa_device *vdev)
+{
+ return device_add(&vdev->dev...
2020 Apr 14
2
[GIT PULL] vhost: cleanups and fixes
...OM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM" (2020-04-07 05:44:57 -0400)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
for you to fetch changes up to d4a85c2ace895a58dcab687ff49c76719011f58d:
vdpa: fix comment of vdpa_register_device() (2020-04-13 07:16:41 -0400)
----------------------------------------------------------------
virtio: fixes, cleanups
Some bug fixes.
Cleanup a couple of issues that surfaced meanwhile.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
------------------------------------------------...
2020 Apr 14
2
[GIT PULL] vhost: cleanups and fixes
...OM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM" (2020-04-07 05:44:57 -0400)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
for you to fetch changes up to d4a85c2ace895a58dcab687ff49c76719011f58d:
vdpa: fix comment of vdpa_register_device() (2020-04-13 07:16:41 -0400)
----------------------------------------------------------------
virtio: fixes, cleanups
Some bug fixes.
Cleanup a couple of issues that surfaced meanwhile.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
------------------------------------------------...
2020 Feb 10
9
[PATCH V2 0/5] vDPA support
...Shan, Tiwei)
- accept parent device and dma device when register vdpa device
- coding style and compile fixes (Randy)
- using vdpa_xxx instead of xxx_vdpa (Jason)
- ove vDPA accessors to header and make it static inline (Jason)
- split vdp_register_device() into two helpers vdpa_init_device() and
vdpa_register_device() which allows intermediate step to be done (Jason)
- warn on invalidate queue state when fail to creating virtqueue (Jason)
- make to_virtio_vdpa_device() static (Jason)
- use kmalloc/kfree instead of devres for virtio vdpa device (Jason)
- avoid using cast in vdpa bus function (Jason)
- introduce...
2020 Apr 20
1
[GIT PULL v2] vhost: cleanups and fixes
...k (1):
virtio-balloon: Avoid using the word 'report' when referring to free page hinting
Eugenio P?rez (1):
vhost: Create accessors for virtqueues private_data
Gustavo A. R. Silva (1):
vhost: vdpa: remove unnecessary null check
Jason Wang (1):
vdpa: fix comment of vdpa_register_device()
Jason Yan (2):
vhost: remove set but not used variable 'status'
virtio-balloon: make virtballoon_free_page_report() static
Michael S. Tsirkin (15):
vdpa-sim: depend on HAS_DMA
virtio/test: fix up after IOTLB changes
tools/virtio: define aligned attribute...
2020 Jul 17
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
...bus_register(&vdpa_bus);
> diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
> index 239db79..7d64d83 100644
> --- a/include/linux/vdpa.h
> +++ b/include/linux/vdpa.h
> @@ -220,17 +220,30 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent,
>
> int vdpa_register_device(struct vdpa_device *vdev);
> void vdpa_unregister_device(struct vdpa_device *vdev);
> +/* request irq for a vq, setup irq offloading if its a vhost_vdpa vq */
Let's do the documentation in vdpa.c, and again, document the devres
implications or j_xxxust name it as vdpa_devm_xxx.
>...
2020 Jul 13
0
[PATCH 4/7] vDPA: implement IRQ offloading helpers in vDPA core
...__init vhost_vdpa_init(void)
> diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
> index 239db79..9f9b245 100644
> --- a/include/linux/vdpa.h
> +++ b/include/linux/vdpa.h
> @@ -220,17 +220,28 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent,
>
> int vdpa_register_device(struct vdpa_device *vdev);
> void vdpa_unregister_device(struct vdpa_device *vdev);
> +int vdpa_alloc_vq_irq(struct device *dev, struct vdpa_device *vdev,
> + unsigned int irq, irq_handler_t handler,
> + unsigned long irqflags, const char *devname, void *dev_id,
> +...
2022 Oct 21
5
[PATCH v3 0/4] vDPA: initial config export via "vdpa dev show"
...rtio_config" to "initial_config" in command example
output (Parav)
v1 -> v2:
- Revised example output to export all config attributes under a
json object (Jason)
---
Si-Wei Liu (4):
vdpa: save vdpa_dev_set_config in struct vdpa_device
vdpa: pass initial config to _vdpa_register_device()
vdpa: show dev config as-is in "vdpa dev show" output
vdpa: fix improper error message when adding vdpa dev
drivers/vdpa/ifcvf/ifcvf_main.c | 2 +-
drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
drivers/vdpa/vdpa.c | 63 +++++++++++++++++++++++++++++++++---
d...
2020 Jul 11
0
[vhost:config-endian 33/36] drivers/vdpa/vdpa_sim/vdpa_sim.c:335:21: sparse: sparse: incorrect type in assignment (different base types)
...t;iommu);
2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 341
2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 342 vdpasim->vdpa.dma_dev = dev;
2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 343 ret = vdpa_register_device(&vdpasim->vdpa);
2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 344 if (ret)
2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 345 goto err_iommu;
2c53d0f64c06f4 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 346...
2020 Sep 18
0
[RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication
...t(bus) you proposed but the possibility of replacing virtio-pci-epf
>>>> with vDPA in:
>>> Okay, so the virtio back-end still use vhost and front end should use
>>> vDPA. I see. So the host side PCI driver for EPF should populate
>>> vdpa_config_ops and invoke vdpa_register_device().
>>
>> Yes.
>>
>>
>>>> My question is basically for the part of virtio_pci_epf_send_command(),
>>>> so it looks to me you have a vendor specific API to replace the
>>>> virtio-pci layout of the BAR:
>>> Even when we use vDPA, we...
2020 Sep 16
0
[RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication
...cing vDPA with the
>> vhost(bus) you proposed but the possibility of replacing virtio-pci-epf
>> with vDPA in:
> Okay, so the virtio back-end still use vhost and front end should use
> vDPA. I see. So the host side PCI driver for EPF should populate
> vdpa_config_ops and invoke vdpa_register_device().
Yes.
>> My question is basically for the part of virtio_pci_epf_send_command(),
>> so it looks to me you have a vendor specific API to replace the
>> virtio-pci layout of the BAR:
> Even when we use vDPA, we have to use some sort of
> virtio_pci_epf_send_command() to...
2020 Feb 20
5
[PATCH V4 0/5] vDPA support
...Shan, Tiwei)
- accept parent device and dma device when register vdpa device
- coding style and compile fixes (Randy)
- using vdpa_xxx instead of xxx_vdpa (Jason)
- ove vDPA accessors to header and make it static inline (Jason)
- split vdp_register_device() into two helpers vdpa_init_device() and
vdpa_register_device() which allows intermediate step to be done (Jason)
- warn on invalidate queue state when fail to creating virtqueue (Jason)
- make to_virtio_vdpa_device() static (Jason)
- use kmalloc/kfree instead of devres for virtio vdpa device (Jason)
- avoid using cast in vdpa bus function (Jason)
- introduce...
2020 Feb 20
9
[PATCH V3 0/5] vDPA support
...Shan, Tiwei)
- accept parent device and dma device when register vdpa device
- coding style and compile fixes (Randy)
- using vdpa_xxx instead of xxx_vdpa (Jason)
- ove vDPA accessors to header and make it static inline (Jason)
- split vdp_register_device() into two helpers vdpa_init_device() and
vdpa_register_device() which allows intermediate step to be done (Jason)
- warn on invalidate queue state when fail to creating virtqueue (Jason)
- make to_virtio_vdpa_device() static (Jason)
- use kmalloc/kfree instead of devres for virtio vdpa device (Jason)
- avoid using cast in vdpa bus function (Jason)
- introduce...
2020 Jun 10
2
[PATCH V3] vdpa: introduce virtio pci driver
...gt;> +
>> + vp_vdpa->device = map_capability(vp_vdpa, device, NULL);
>> + vp_vdpa->notify = map_capability(vp_vdpa, notify, ¬ify_pa);
>> + vp_vdpa->common = map_capability(vp_vdpa, common, NULL);
>> + vp_vdpa->id = virtio_id;
>> +
>> + ret = vdpa_register_device(&vp_vdpa->vdpa);
>> + if (ret) {
>> + dev_err(&pdev->dev, "Failed to register to vdpa bus\n");
>> + goto err;
>> + }
>> +
>> + pci_read_config_dword(pdev, notify + sizeof(struct virtio_pci_cap),
>> + &vp_vdpa->notify...