search for: drv_to_vdpa

Displaying 9 results from an estimated 9 matches for "drv_to_vdpa".

Did you mean: dev_to_vdpa
2020 Jul 17
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
...pa.c > +++ b/drivers/vdpa/vdpa.c > @@ -163,6 +163,48 @@ void vdpa_unregister_driver(struct vdpa_driver *drv) > } > EXPORT_SYMBOL_GPL(vdpa_unregister_driver); > > +static void vdpa_setup_irq(struct vdpa_device *vdev, int qid, int irq) > +{ > + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); > + > + if (drv->setup_vq_irq) > + drv->setup_vq_irq(vdev, qid, irq); > +} > + > +static void vdpa_unsetup_irq(struct vdpa_device *vdev, int qid) > +{ > + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); > + > + if (drv->unset...
2020 Jul 13
0
[PATCH 4/7] vDPA: implement IRQ offloading helpers in vDPA core
...pa.c > +++ b/drivers/vdpa/vdpa.c > @@ -163,6 +163,52 @@ void vdpa_unregister_driver(struct vdpa_driver *drv) > } > EXPORT_SYMBOL_GPL(vdpa_unregister_driver); > > +static void vdpa_setup_irq(struct vdpa_device *vdev, int qid, int irq) > +{ > + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); > + > +#ifdef CONFIG_HAVE_KVM_IRQ_BYPASS Let's don't do the check here. It's the responsibility of driver to decide what it should do. > + if (drv->setup_vq_irq) > + drv->setup_vq_irq(vdev, qid, irq); > +#endif > +} > + > +static...
2020 Feb 10
0
[PATCH V2 3/5] vDPA: introduce vDPA bus
...ng <jasowang at redhat.com> + * + */ + +#include <linux/module.h> +#include <linux/idr.h> +#include <linux/vdpa.h> + +static DEFINE_IDA(vdpa_index_ida); + +static int vdpa_dev_probe(struct device *d) +{ + struct vdpa_device *vdev = dev_to_vdpa(d); + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); + int ret = 0; + + if (drv && drv->probe) + ret = drv->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 &...
2020 Feb 20
0
[PATCH V3 3/5] vDPA: introduce vDPA bus
...t; + * + */ + +#include <linux/module.h> +#include <linux/idr.h> +#include <linux/slab.h> +#include <linux/vdpa.h> + +static DEFINE_IDA(vdpa_index_ida); + +static int vdpa_dev_probe(struct device *d) +{ + struct vdpa_device *vdev = dev_to_vdpa(d); + struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); + int ret = 0; + + if (drv && drv->probe) + ret = drv->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 &...
2020 Jul 20
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
On 2020/7/20 ??5:07, Zhu, Lingshan wrote: >>> >>> +} >>> + >>> +static void vdpa_unsetup_irq(struct vdpa_device *vdev, int qid) >>> +{ >>> +??? struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); >>> + >>> +??? if (drv->unsetup_vq_irq) >>> +??????? drv->unsetup_vq_irq(vdev, qid); >> >> >> Do you need to check the existence of drv before calling unset_vq_irq()? > Yes, we should check this when we take the releasing p...
2020 Jul 21
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
...ng wrote: >> >> On 2020/7/20 ??5:07, Zhu, Lingshan wrote: >>>>> >>>>> +} >>>>> + >>>>> +static void vdpa_unsetup_irq(struct vdpa_device *vdev, int qid) >>>>> +{ >>>>> +??? struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); >>>>> + >>>>> +??? if (drv->unsetup_vq_irq) >>>>> +??????? drv->unsetup_vq_irq(vdev, qid); >>>> >>>> >>>> Do you need to check the existence of drv before calling >>>> unset_vq_...
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
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