search for: vhost_vdpa_probe

Displaying 10 results from an estimated 10 matches for "vhost_vdpa_probe".

2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...ri, Jan 31, 2020 at 11:36:51AM +0800, Tiwei Bie wrote: > +static int vhost_vdpa_alloc_minor(struct vhost_vdpa *v) > +{ > + return idr_alloc(&vhost_vdpa.idr, v, 0, MINORMASK + 1, > + GFP_KERNEL); > +} Please don't use idr in new code, use xarray directly > +static int vhost_vdpa_probe(struct device *dev) > +{ > + struct vdpa_device *vdpa = dev_to_vdpa(dev); > + const struct vdpa_config_ops *ops = vdpa->config; > + struct vhost_vdpa *v; > + struct device *d; > + int minor, nvqs; > + int r; > + > + /* Currently, we only accept the network devices. */...
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...ri, Jan 31, 2020 at 11:36:51AM +0800, Tiwei Bie wrote: > +static int vhost_vdpa_alloc_minor(struct vhost_vdpa *v) > +{ > + return idr_alloc(&vhost_vdpa.idr, v, 0, MINORMASK + 1, > + GFP_KERNEL); > +} Please don't use idr in new code, use xarray directly > +static int vhost_vdpa_probe(struct device *dev) > +{ > + struct vdpa_device *vdpa = dev_to_vdpa(dev); > + const struct vdpa_config_ops *ops = vdpa->config; > + struct vhost_vdpa *v; > + struct device *d; > + int minor, nvqs; > + int r; > + > + /* Currently, we only accept the network devices. */...
2020 Feb 19
0
[PATCH] vhost: introduce vDPA based backend
...ote: > > > +static int vhost_vdpa_alloc_minor(struct vhost_vdpa *v) > > +{ > > + return idr_alloc(&vhost_vdpa.idr, v, 0, MINORMASK + 1, > > + GFP_KERNEL); > > +} > > Please don't use idr in new code, use xarray directly > > > +static int vhost_vdpa_probe(struct device *dev) > > +{ > > + struct vdpa_device *vdpa = dev_to_vdpa(dev); > > + const struct vdpa_config_ops *ops = vdpa->config; > > + struct vhost_vdpa *v; > > + struct device *d; > > + int minor, nvqs; > > + int r; > > + > > + /* Curre...
2020 Jul 17
0
[PATCH V2 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...q->call_ctx.producer.irq) > + vhost_vdpa_update_vq_irq(vq); Is this safe to check producer.irq outside spinlock? Thanks > break; > > case VHOST_SET_VRING_NUM: > @@ -951,6 +997,8 @@ static void vhost_vdpa_remove(struct vdpa_device *vdpa) > }, > .probe = vhost_vdpa_probe, > .remove = vhost_vdpa_remove, > + .setup_vq_irq = vhost_vdpa_setup_vq_irq, > + .unsetup_vq_irq = vhost_vdpa_unsetup_vq_irq, > }; > > static int __init vhost_vdpa_init(void)
2023 Feb 16
0
[PATCH v2] vhost/vdpa: Add MSI translation tables to iommu for software-managed MSI
...> + if (ret) > + goto err_attach_device; > > -err_attach: > + return 0; > +err_attach_device: > + iommu_detach_device(v->domain, dma_dev); > +err_alloc_domain: > iommu_domain_free(v->domain); > return ret; > } > @@ -1385,6 +1436,8 @@ static int vhost_vdpa_probe(struct vdpa_device *vdpa) > goto err; > } > > + vhost_iotlb_init(&v->resv_iotlb, 0, 0); > + > r = dev_set_name(&v->dev, "vhost-vdpa-%u", minor); > if (r) > goto err; We need clean resv_iotlb during release(). Other looks good....
2020 Jul 13
0
[PATCH 4/7] vDPA: implement IRQ offloading helpers in vDPA core
...n host kernel to accelerate > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c > index 92683e4..6e25158 100644 > --- a/drivers/vhost/vdpa.c > +++ b/drivers/vhost/vdpa.c > @@ -1020,6 +1020,8 @@ static void vhost_vdpa_remove(struct vdpa_device *vdpa) > }, > .probe = vhost_vdpa_probe, > .remove = vhost_vdpa_remove, > + .setup_vq_irq = vhost_vdpa_setup_vq_irq, > + .unsetup_vq_irq = vhost_vdpa_unsetup_vq_irq, > }; > > static int __init vhost_vdpa_init(void) > diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h > index 239db79..9f9b245 100644...
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...+} > + > +static const struct file_operations vhost_vdpa_fops = { > + .owner = THIS_MODULE, > + .open = vhost_vdpa_open, > + .release = vhost_vdpa_release, > + .unlocked_ioctl = vhost_vdpa_unlocked_ioctl, > + .compat_ioctl = compat_ptr_ioctl, > +}; > + > +static int vhost_vdpa_probe(struct device *dev) > +{ > + struct vdpa_device *vdpa = dev_to_vdpa(dev); > + const struct vdpa_config_ops *ops = vdpa->config; > + struct vhost_vdpa *v; > + struct device *d; > + int minor, nvqs; > + int r; > + > + /* Currently, we only accept the network devices. */...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...+} > + > +static const struct file_operations vhost_vdpa_fops = { > + .owner = THIS_MODULE, > + .open = vhost_vdpa_open, > + .release = vhost_vdpa_release, > + .unlocked_ioctl = vhost_vdpa_unlocked_ioctl, > + .compat_ioctl = compat_ptr_ioctl, > +}; > + > +static int vhost_vdpa_probe(struct device *dev) > +{ > + struct vdpa_device *vdpa = dev_to_vdpa(dev); > + const struct vdpa_config_ops *ops = vdpa->config; > + struct vhost_vdpa *v; > + struct device *d; > + int minor, nvqs; > + int r; > + > + /* Currently, we only accept the network devices. */...