search for: device_data

Displaying 20 results from an estimated 95 matches for "device_data".

2019 Sep 17
2
[RFC PATCH 2/2] mdev: introduce device specific ops
...nt vfio_ap_mdev_register(void) > diff --git a/drivers/vfio/mdev/vfio_mdev.c > b/drivers/vfio/mdev/vfio_mdev.c > index 887c57f10880..1196fbb6c3d2 100644 > --- a/drivers/vfio/mdev/vfio_mdev.c > +++ b/drivers/vfio/mdev/vfio_mdev.c > @@ -25,15 +25,16 @@ static int vfio_mdev_open(void *device_data) > { > struct mdev_device *mdev = device_data; > struct mdev_parent *parent = mdev->parent; > + const struct vfio_mdev_parent_ops *ops = parent->ops- > >device_ops; > int ret; > > - if (unlikely(!parent->ops->open)) > + if (unlikely(!ops->open))...
2019 Sep 17
2
[RFC PATCH 2/2] mdev: introduce device specific ops
...nt vfio_ap_mdev_register(void) > diff --git a/drivers/vfio/mdev/vfio_mdev.c > b/drivers/vfio/mdev/vfio_mdev.c > index 887c57f10880..1196fbb6c3d2 100644 > --- a/drivers/vfio/mdev/vfio_mdev.c > +++ b/drivers/vfio/mdev/vfio_mdev.c > @@ -25,15 +25,16 @@ static int vfio_mdev_open(void *device_data) > { > struct mdev_device *mdev = device_data; > struct mdev_parent *parent = mdev->parent; > + const struct vfio_mdev_parent_ops *ops = parent->ops- > >device_ops; > int ret; > > - if (unlikely(!parent->ops->open)) > + if (unlikely(!ops->open))...
2019 Sep 17
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...clude <linux/kernel.h> #include <linux/slab.h> #include <linux/vfio.h> #include <linux/mdev.h> #include "mdev_private.h" /* XXX: we need a proper way to include below vhost header. */ #include "../../vhost/vhost.h" static int vfio_vhost_mdev_open(void *device_data) { if (!try_module_get(THIS_MODULE)) return -ENODEV; /* ... */ vhost_dev_init(...); return 0; } static void vfio_vhost_mdev_release(void *device_data) { /* ... */ module_put(THIS_MODULE); } static long vfio_vhost_mdev_unlocked_ioctl(void *device_data, unsigned int cmd, unsigned...
2019 Sep 17
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...clude <linux/kernel.h> #include <linux/slab.h> #include <linux/vfio.h> #include <linux/mdev.h> #include "mdev_private.h" /* XXX: we need a proper way to include below vhost header. */ #include "../../vhost/vhost.h" static int vfio_vhost_mdev_open(void *device_data) { if (!try_module_get(THIS_MODULE)) return -ENODEV; /* ... */ vhost_dev_init(...); return 0; } static void vfio_vhost_mdev_release(void *device_data) { /* ... */ module_put(THIS_MODULE); } static long vfio_vhost_mdev_unlocked_ioctl(void *device_data, unsigned int cmd, unsigned...
2019 Sep 26
2
[PATCH V2 5/8] mdev: introduce device specific ops
...de <linux/mdev.h> > > > > > +#include <linux/vfio_mdev.h> > > > > > > > > > > #include "mdev_private.h" > > > > > > > > > > @@ -24,16 +25,16 @@ > > > > > static int vfio_mdev_open(void *device_data) > > > > > { > > > > > struct mdev_device *mdev = device_data; > > > > > - struct mdev_parent *parent = mdev->parent; > > > > > + const struct vfio_mdev_device_ops *ops = > > > > mdev_get_dev_ops(mdev); > &gt...
2019 Sep 26
2
[PATCH V2 5/8] mdev: introduce device specific ops
...de <linux/mdev.h> > > > > > +#include <linux/vfio_mdev.h> > > > > > > > > > > #include "mdev_private.h" > > > > > > > > > > @@ -24,16 +25,16 @@ > > > > > static int vfio_mdev_open(void *device_data) > > > > > { > > > > > struct mdev_device *mdev = device_data; > > > > > - struct mdev_parent *parent = mdev->parent; > > > > > + const struct vfio_mdev_device_ops *ops = > > > > mdev_get_dev_ops(mdev); > &gt...
2019 Sep 12
0
[RFC PATCH 2/2] mdev: introduce device specific ops
...= &vfio_mdev_ops, }; int vfio_ap_mdev_register(void) diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c index 887c57f10880..1196fbb6c3d2 100644 --- a/drivers/vfio/mdev/vfio_mdev.c +++ b/drivers/vfio/mdev/vfio_mdev.c @@ -25,15 +25,16 @@ static int vfio_mdev_open(void *device_data) { struct mdev_device *mdev = device_data; struct mdev_parent *parent = mdev->parent; + const struct vfio_mdev_parent_ops *ops = parent->ops->device_ops; int ret; - if (unlikely(!parent->ops->open)) + if (unlikely(!ops->open)) return -EINVAL; if (!try_module_get(TH...
2019 Sep 17
0
[RFC PATCH 2/2] mdev: introduce device specific ops
...(void) >> diff --git a/drivers/vfio/mdev/vfio_mdev.c >> b/drivers/vfio/mdev/vfio_mdev.c >> index 887c57f10880..1196fbb6c3d2 100644 >> --- a/drivers/vfio/mdev/vfio_mdev.c >> +++ b/drivers/vfio/mdev/vfio_mdev.c >> @@ -25,15 +25,16 @@ static int vfio_mdev_open(void *device_data) >> { >> struct mdev_device *mdev = device_data; >> struct mdev_parent *parent = mdev->parent; >> + const struct vfio_mdev_parent_ops *ops = parent->ops- >>> device_ops; >> int ret; >> >> - if (unlikely(!parent->ops->open)) &...
2019 Sep 23
0
[PATCH 2/6] mdev: introduce device specific ops
...s/vfio/mdev/vfio_mdev.c +++ b/drivers/vfio/mdev/vfio_mdev.c @@ -14,6 +14,7 @@ #include <linux/slab.h> #include <linux/vfio.h> #include <linux/mdev.h> +#include <linux/vfio_mdev.h> #include "mdev_private.h" @@ -25,15 +26,16 @@ static int vfio_mdev_open(void *device_data) { struct mdev_device *mdev = device_data; struct mdev_parent *parent = mdev->parent; + const struct vfio_mdev_parent_ops *ops = parent->ops->device_ops; int ret; - if (unlikely(!parent->ops->open)) + if (unlikely(!ops->open)) return -EINVAL; if (!try_module_get(TH...
2019 Sep 18
1
[RFC PATCH 2/2] mdev: introduce device specific ops
...t a/drivers/vfio/mdev/vfio_mdev.c > >> b/drivers/vfio/mdev/vfio_mdev.c > >> index 887c57f10880..1196fbb6c3d2 100644 > >> --- a/drivers/vfio/mdev/vfio_mdev.c > >> +++ b/drivers/vfio/mdev/vfio_mdev.c > >> @@ -25,15 +25,16 @@ static int vfio_mdev_open(void *device_data) > >> { > >> struct mdev_device *mdev = device_data; > >> struct mdev_parent *parent = mdev->parent; > >> + const struct vfio_mdev_parent_ops *ops = parent->ops- > >>> device_ops; > >> int ret; > >> > >> - i...
2019 Sep 24
0
[PATCH 2/6] mdev: introduce device specific ops
...+14,7 @@ >> #include <linux/slab.h> >> #include <linux/vfio.h> >> #include <linux/mdev.h> >> +#include <linux/vfio_mdev.h> >> >> #include "mdev_private.h" >> >> @@ -25,15 +26,16 @@ static int vfio_mdev_open(void *device_data) { >> struct mdev_device *mdev = device_data; >> struct mdev_parent *parent = mdev->parent; >> + const struct vfio_mdev_parent_ops *ops = parent->ops->device_ops; >> int ret; >> >> - if (unlikely(!parent->ops->open)) >> + if (unlikely(...
2019 Sep 25
3
[PATCH V2 5/8] mdev: introduce device specific ops
...; > #include <linux/vfio.h> > > > #include <linux/mdev.h> > > > +#include <linux/vfio_mdev.h> > > > > > > #include "mdev_private.h" > > > > > > @@ -24,16 +25,16 @@ > > > static int vfio_mdev_open(void *device_data) > > > { > > > struct mdev_device *mdev = device_data; > > > - struct mdev_parent *parent = mdev->parent; > > > + const struct vfio_mdev_device_ops *ops = > > mdev_get_dev_ops(mdev); > > > int ret; > > > > > > -...
2019 Sep 25
3
[PATCH V2 5/8] mdev: introduce device specific ops
...; > #include <linux/vfio.h> > > > #include <linux/mdev.h> > > > +#include <linux/vfio_mdev.h> > > > > > > #include "mdev_private.h" > > > > > > @@ -24,16 +25,16 @@ > > > static int vfio_mdev_open(void *device_data) > > > { > > > struct mdev_device *mdev = device_data; > > > - struct mdev_parent *parent = mdev->parent; > > > + const struct vfio_mdev_device_ops *ops = > > mdev_get_dev_ops(mdev); > > > int ret; > > > > > > -...
2019 Sep 12
9
[RFC PATCH 0/2] Mdev: support mutiple kinds of devices
Hi all: During the development of virtio-mdev[1]. I find that mdev needs to be extended to support devices other than vfio mdev device. So this series tries to extend the mdev to be able to differ from different devices by: - device id and matching for mdev bus - device speicfic callbacks and move vfio callbacks there Sent for early reivew, compile test only! Thanks [1]
2019 Sep 12
9
[RFC PATCH 0/2] Mdev: support mutiple kinds of devices
Hi all: During the development of virtio-mdev[1]. I find that mdev needs to be extended to support devices other than vfio mdev device. So this series tries to extend the mdev to be able to differ from different devices by: - device id and matching for mdev bus - device speicfic callbacks and move vfio callbacks there Sent for early reivew, compile test only! Thanks [1]
2019 Sep 18
0
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...linux/slab.h> > #include <linux/vfio.h> > #include <linux/mdev.h> > > #include "mdev_private.h" > > /* XXX: we need a proper way to include below vhost header. */ > #include "../../vhost/vhost.h" > > static int vfio_vhost_mdev_open(void *device_data) > { > if (!try_module_get(THIS_MODULE)) > return -ENODEV; > > /* ... */ > vhost_dev_init(...); > > return 0; > } > > static void vfio_vhost_mdev_release(void *device_data) > { > /* ... */ > module_put(THIS_MODULE); > } > > static long vfio...
2019 Sep 24
3
[PATCH V2 5/8] mdev: introduce device specific ops
...o_mdev.c > @@ -14,6 +14,7 @@ > #include <linux/slab.h> > #include <linux/vfio.h> > #include <linux/mdev.h> > +#include <linux/vfio_mdev.h> > > #include "mdev_private.h" > > @@ -24,16 +25,16 @@ > static int vfio_mdev_open(void *device_data) > { > struct mdev_device *mdev = device_data; > - struct mdev_parent *parent = mdev->parent; > + const struct vfio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); > int ret; > > - if (unlikely(!parent->ops->open)) > + if (unlikely(!ops->open)) > retu...
2019 Sep 24
3
[PATCH V2 5/8] mdev: introduce device specific ops
...o_mdev.c > @@ -14,6 +14,7 @@ > #include <linux/slab.h> > #include <linux/vfio.h> > #include <linux/mdev.h> > +#include <linux/vfio_mdev.h> > > #include "mdev_private.h" > > @@ -24,16 +25,16 @@ > static int vfio_mdev_open(void *device_data) > { > struct mdev_device *mdev = device_data; > - struct mdev_parent *parent = mdev->parent; > + const struct vfio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); > int ret; > > - if (unlikely(!parent->ops->open)) > + if (unlikely(!ops->open)) > retu...
2019 Sep 24
0
[PATCH V2 5/8] mdev: introduce device specific ops
.../vfio/mdev/vfio_mdev.c +++ b/drivers/vfio/mdev/vfio_mdev.c @@ -14,6 +14,7 @@ #include <linux/slab.h> #include <linux/vfio.h> #include <linux/mdev.h> +#include <linux/vfio_mdev.h> #include "mdev_private.h" @@ -24,16 +25,16 @@ static int vfio_mdev_open(void *device_data) { struct mdev_device *mdev = device_data; - struct mdev_parent *parent = mdev->parent; + const struct vfio_mdev_device_ops *ops = mdev_get_dev_ops(mdev); int ret; - if (unlikely(!parent->ops->open)) + if (unlikely(!ops->open)) return -EINVAL; if (!try_module_get(THIS_MODU...
2019 Sep 18
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...io.h> > > #include <linux/mdev.h> > > > > #include "mdev_private.h" > > > > /* XXX: we need a proper way to include below vhost header. */ > > #include "../../vhost/vhost.h" > > > > static int vfio_vhost_mdev_open(void *device_data) > > { > > if (!try_module_get(THIS_MODULE)) > > return -ENODEV; > > > > /* ... */ > > vhost_dev_init(...); > > > > return 0; > > } > > > > static void vfio_vhost_mdev_release(void *device_data) > > { > > /* ......