Displaying 14 results from an estimated 14 matches for "vhost_vdpa_init".
2023 Feb 23
0
[PATCH v2 11/13] vdpa: block migration if dev does not have _F_SUSPEND
...1 file changed, 21 insertions(+)
>>>
>>> diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
>>> index 84a6b9690b..9d30cf9b3c 100644
>>> --- a/hw/virtio/vhost-vdpa.c
>>> +++ b/hw/virtio/vhost-vdpa.c
>>> @@ -442,6 +442,27 @@ static int vhost_vdpa_init(struct vhost_dev *dev, void *opaque, Error **errp)
>>> return 0;
>>> }
>>>
>>> + /*
>>> + * If dev->shadow_vqs_enabled at initialization that means the device has
>>> + * been started with x-svq=on, so don't b...
2020 Feb 19
1
[PATCH] vhost: introduce vDPA based backend
On Wed, Feb 19, 2020 at 10:52:38AM +0800, Tiwei Bie wrote:
> > > +static int __init vhost_vdpa_init(void)
> > > +{
> > > + int r;
> > > +
> > > + idr_init(&vhost_vdpa.idr);
> > > + mutex_init(&vhost_vdpa.mutex);
> > > + init_waitqueue_head(&vhost_vdpa.release_q);
> > > +
> > > + /* /dev/vhost-vdpa/$vdpa_device_ind...
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...host_vdpa.devt), v->minor));
> + vhost_vdpa_free_minor(v->minor);
> + mutex_unlock(&vhost_vdpa.mutex);
> + kfree(v->vqs);
> + kfree(v);
This use after-fress vs vhost_vdpa_open prior to it setting the open
bit. Maybe use xarray, rcu and kfree_rcu ..
> +static int __init vhost_vdpa_init(void)
> +{
> + int r;
> +
> + idr_init(&vhost_vdpa.idr);
> + mutex_init(&vhost_vdpa.mutex);
> + init_waitqueue_head(&vhost_vdpa.release_q);
> +
> + /* /dev/vhost-vdpa/$vdpa_device_index */
> + vhost_vdpa.class = class_create(THIS_MODULE, "vhost-vdpa"...
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...host_vdpa.devt), v->minor));
> + vhost_vdpa_free_minor(v->minor);
> + mutex_unlock(&vhost_vdpa.mutex);
> + kfree(v->vqs);
> + kfree(v);
This use after-fress vs vhost_vdpa_open prior to it setting the open
bit. Maybe use xarray, rcu and kfree_rcu ..
> +static int __init vhost_vdpa_init(void)
> +{
> + int r;
> +
> + idr_init(&vhost_vdpa.idr);
> + mutex_init(&vhost_vdpa.mutex);
> + init_waitqueue_head(&vhost_vdpa.release_q);
> +
> + /* /dev/vhost-vdpa/$vdpa_device_index */
> + vhost_vdpa.class = class_create(THIS_MODULE, "vhost-vdpa"...
2020 Feb 13
1
[PATCH V2 3/5] vDPA: introduce vDPA bus
...;t find it
> in the kernel either ...
I mean it is the registration function provided by the subsystem that
owns the class, for instance tpm_chip_register(),
ib_register_device(), register_netdev(), rtc_register_device() etc
So if you have some vhost (vhost net?) class then you'd have some
vhost_vdpa_init/alloc(); vhost_vdpa_register(), sequence
presumably. (vs trying to do it with a bus matcher)
I recommend to look at rtc and tpm for fairly simple easy to follow
patterns for creating a subsystem in the kernel. A subsystem owns a class,
allows HW drivers to plug in to it, and provides a consistent...
2020 Apr 01
0
mmotm 2020-03-30-18-46 uploaded (VDPA + vhost)
...he master branch always
>>>>> points to the latest release, so it's constantly rebasing.
>>>>>
>>>>> https://github.com/hnaz/linux-mm
>>>>
>>>> on i386:
>>>>
>>>> ld: drivers/vhost/vdpa.o: in function `vhost_vdpa_init':
>>>> vdpa.c:(.init.text+0x52): undefined reference to `__vdpa_register_driver'
>>>> ld: drivers/vhost/vdpa.o: in function `vhost_vdpa_exit':
>>>> vdpa.c:(.exit.text+0x14): undefined reference to `vdpa_unregister_driver'
>>>>
>>...
2020 Jul 17
0
[PATCH V2 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...-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 Mar 06
0
[PATCH v4 12/15] vdpa: block migration if device has unsupported features
...;>>> diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
> > >>>> index 4f983df000..094dc1c2d0 100644
> > >>>> --- a/net/vhost-vdpa.c
> > >>>> +++ b/net/vhost-vdpa.c
> > >>>> @@ -795,7 +795,8 @@ static NetClientState *net_vhost_vdpa_init(NetClientState *peer,
> > >>>> int nvqs,
> > >>>> bool is_datapath,
> > >>>> bool svq,
> > >>>> -...
2020 Feb 19
0
[PATCH] vhost: introduce vDPA based backend
...host_vdpa_free_minor(v->minor);
> > + mutex_unlock(&vhost_vdpa.mutex);
> > + kfree(v->vqs);
> > + kfree(v);
>
> This use after-fress vs vhost_vdpa_open prior to it setting the open
> bit. Maybe use xarray, rcu and kfree_rcu ..
>
> > +static int __init vhost_vdpa_init(void)
> > +{
> > + int r;
> > +
> > + idr_init(&vhost_vdpa.idr);
> > + mutex_init(&vhost_vdpa.mutex);
> > + init_waitqueue_head(&vhost_vdpa.release_q);
> > +
> > + /* /dev/vhost-vdpa/$vdpa_device_index */
> > + vhost_vdpa.class = cla...
2020 Jul 13
0
[PATCH 4/7] vDPA: implement IRQ offloading helpers in vDPA core
...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
> --- 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(st...
2020 Feb 13
4
[PATCH V2 3/5] vDPA: introduce vDPA bus
On Thu, Feb 13, 2020 at 10:41:06AM -0500, Michael S. Tsirkin wrote:
> On Thu, Feb 13, 2020 at 11:05:42AM -0400, Jason Gunthorpe wrote:
> > On Thu, Feb 13, 2020 at 10:58:44PM +0800, Jason Wang wrote:
> > >
> > > On 2020/2/13 ??9:41, Jason Gunthorpe wrote:
> > > > On Thu, Feb 13, 2020 at 11:34:10AM +0800, Jason Wang wrote:
> > > >
> > >
2020 Feb 13
4
[PATCH V2 3/5] vDPA: introduce vDPA bus
On Thu, Feb 13, 2020 at 10:41:06AM -0500, Michael S. Tsirkin wrote:
> On Thu, Feb 13, 2020 at 11:05:42AM -0400, Jason Gunthorpe wrote:
> > On Thu, Feb 13, 2020 at 10:58:44PM +0800, Jason Wang wrote:
> > >
> > > On 2020/2/13 ??9:41, Jason Gunthorpe wrote:
> > > > On Thu, Feb 13, 2020 at 11:34:10AM +0800, Jason Wang wrote:
> > > >
> > >
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...ot;,
> + },
> + .probe = vhost_vdpa_probe,
> + .remove = vhost_vdpa_remove,
> +};
> +
> +static char *vhost_vdpa_devnode(struct device *dev, umode_t *mode)
> +{
> + return kasprintf(GFP_KERNEL, "vhost-vdpa/%s", dev_name(dev));
> +}
> +
> +static int __init vhost_vdpa_init(void)
> +{
> + int r;
> +
> + idr_init(&vhost_vdpa.idr);
> + mutex_init(&vhost_vdpa.mutex);
> + init_waitqueue_head(&vhost_vdpa.release_q);
> +
> + /* /dev/vhost-vdpa/$vdpa_device_index */
> + vhost_vdpa.class = class_create(THIS_MODULE, "vhost-vdpa"...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...ot;,
> + },
> + .probe = vhost_vdpa_probe,
> + .remove = vhost_vdpa_remove,
> +};
> +
> +static char *vhost_vdpa_devnode(struct device *dev, umode_t *mode)
> +{
> + return kasprintf(GFP_KERNEL, "vhost-vdpa/%s", dev_name(dev));
> +}
> +
> +static int __init vhost_vdpa_init(void)
> +{
> + int r;
> +
> + idr_init(&vhost_vdpa.idr);
> + mutex_init(&vhost_vdpa.mutex);
> + init_waitqueue_head(&vhost_vdpa.release_q);
> +
> + /* /dev/vhost-vdpa/$vdpa_device_index */
> + vhost_vdpa.class = class_create(THIS_MODULE, "vhost-vdpa"...