search for: vdpa_bus

Displaying 12 results from an estimated 12 matches for "vdpa_bus".

2020 Feb 10
0
[PATCH V2 3/5] vDPA: introduce vDPA bus
...gt;probe(vdev); + + return ret; +} + +static int vdpa_dev_remove(struct device *d) +{ + struct vdpa_device *vdev = dev_to_vdpa(d); + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); + + if (drv && drv->remove) + drv->remove(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 in...
2020 Mar 04
1
[PATCH V5 3/5] vDPA: introduce vDPA bus
...parent || !dma_dev || !config) > + goto err; > + > + vdev = kzalloc(sizeof(*vdev), GFP_KERNEL); > + if (!vdev) > + goto err; > + > + err = ida_simple_get(&vdpa_index_ida, 0, 0, GFP_KERNEL); > + if (err < 0) > + goto err_ida; > + > + vdev->dev.bus = &vdpa_bus; > + vdev->dev.parent = parent; > + vdev->dev.release = vdpa_release_dev; > + > + device_initialize(&vdev->dev); > + > + vdev->index = err; > + vdev->dma_dev = dma_dev; > + vdev->config = config; > + > + dev_set_name(&vdev->dev, "vdpa%...
2020 Feb 20
0
[PATCH V3 3/5] vDPA: introduce vDPA bus
...gt;probe(vdev); + + return ret; +} + +static int vdpa_dev_remove(struct device *d) +{ + struct vdpa_device *vdev = dev_to_vdpa(d); + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); + + if (drv && drv->remove) + drv->remove(vdev); + + return 0; +} + +static struct bus_type vdpa_bus = { + .name = "vdpa", + .probe = vdpa_dev_probe, + .remove = vdpa_dev_remove, +}; + +static void vdpa_release_dev(struct device *d) +{ + struct vdpa_device *vdev = dev_to_vdpa(d); + + ida_simple_remove(&vdpa_index_ida, vdev->index); + kfree(vdev); +} + +/** + * vdpa_alloc_device -...
2020 Feb 11
2
[PATCH V2 3/5] vDPA: introduce vDPA bus
...the vdpa device driver to be unregistered > + */ > +void vdpa_unregister_driver(struct vdpa_driver *drv) > +{ > + driver_unregister(&drv->driver); > +} > +EXPORT_SYMBOL_GPL(vdpa_unregister_driver); > + > +static int vdpa_init(void) > +{ > + if (bus_register(&vdpa_bus) != 0) > + panic("virtio bus registration failed"); > + return 0; > +} Linus will tell you not to kill the kernel - return the error code and propagate it up to the module init function. > +/** > + * vDPA device - representation of a vDPA device > + * @dev: underlying...
2020 Feb 11
2
[PATCH V2 3/5] vDPA: introduce vDPA bus
...the vdpa device driver to be unregistered > + */ > +void vdpa_unregister_driver(struct vdpa_driver *drv) > +{ > + driver_unregister(&drv->driver); > +} > +EXPORT_SYMBOL_GPL(vdpa_unregister_driver); > + > +static int vdpa_init(void) > +{ > + if (bus_register(&vdpa_bus) != 0) > + panic("virtio bus registration failed"); > + return 0; > +} Linus will tell you not to kill the kernel - return the error code and propagate it up to the module init function. > +/** > + * vDPA device - representation of a vDPA device > + * @dev: underlying...
2020 Feb 12
0
[PATCH V2 3/5] vDPA: introduce vDPA bus
...d >> + */ >> +void vdpa_unregister_driver(struct vdpa_driver *drv) >> +{ >> + driver_unregister(&drv->driver); >> +} >> +EXPORT_SYMBOL_GPL(vdpa_unregister_driver); >> + >> +static int vdpa_init(void) >> +{ >> + if (bus_register(&vdpa_bus) != 0) >> + panic("virtio bus registration failed"); >> + return 0; >> +} > Linus will tell you not to kill the kernel - return the error code and > propagate it up to the module init function. Yes, will fix. > >> +/** >> + * vDPA device - repre...
2020 Jul 17
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
...device *dev, struct vdpa_device *vdev, int irq, > + int qid, void *dev_id) > +{ > + devm_free_irq(dev, irq, dev_id); > + vdpa_unsetup_irq(vdev, qid); > +} > +EXPORT_SYMBOL_GPL(vdpa_free_vq_irq); > + > static int vdpa_init(void) > { > return 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...
2020 Jul 13
0
[PATCH 4/7] vDPA: implement IRQ offloading helpers in vDPA core
...device *dev, struct vdpa_device *vdev, int irq, > + int qid, void *dev_id) > +{ > + devm_free_irq(dev, irq, dev_id); > + vdpa_unsetup_irq(vdev, qid); > +} > +EXPORT_SYMBOL_GPL(vdpa_free_vq_irq); > + > static int vdpa_init(void) > { > return bus_register(&vdpa_bus); > diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig Let squash the vhost patch into patch 3. > index d3688c6..587fbae 100644 > --- a/drivers/vhost/Kconfig > +++ b/drivers/vhost/Kconfig > @@ -65,6 +65,7 @@ config VHOST_VDPA > tristate "Vhost driver for vDPA-b...
2020 Feb 10
9
[PATCH V2 0/5] vDPA support
Hi all: This is an updated version of kernel support for vDPA device. Various changes were made based on the feedback since last verion. One major change is to drop the sysfs API and leave the management interface for future development, and introudce the incremental DMA bus operations. Please see changelog for more information. The work on vhost, IFCVF (intel VF driver for vDPA) and qemu is
2020 Feb 20
5
[PATCH V4 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single
2020 Feb 20
9
[PATCH V3 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single
2022 Oct 21
5
[PATCH v3 0/4] vDPA: initial config export via "vdpa dev show"
Live migration of vdpa would typically require re-instate vdpa device with an idential set of configs on the destination node, same way as how source node created the device in the first place. In order to allow live migration orchestration software to export the initial set of vdpa attributes with which the device was created, it will be useful if the vdpa tool can report the config on demand