search for: mdev_dev

Displaying 20 results from an estimated 107 matches for "mdev_dev".

Did you mean: cdev_del
2019 Sep 17
1
[RFC PATCH 2/4] mdev: introduce helper to set per device dma ops
...h> > +#include <linux/dma-mapping.h> > > #include "mdev_private.h" > > @@ -27,6 +28,12 @@ static struct class_compat *mdev_bus_compat_class; > static LIST_HEAD(mdev_list); > static DEFINE_MUTEX(mdev_list_lock); > > +void mdev_set_dma_ops(struct mdev_device *mdev, struct dma_map_ops *ops) > +{ > + set_dma_ops(&mdev->dev, ops); > +} > +EXPORT_SYMBOL(mdev_set_dma_ops); > + Why does mdev need to be involved here? Your sample driver in 4/4 calls this from its create callback, where it could just as easily call: set_dma_ops(md...
2019 Sep 25
1
[PATCH V2 2/8] mdev: class id support
...git a/drivers/gpu/drm/i915/gvt/kvmgt.c > b/drivers/gpu/drm/i915/gvt/kvmgt.c > index 23aa3e50cbf8..f793252a3d2a 100644 > --- a/drivers/gpu/drm/i915/gvt/kvmgt.c > +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c > @@ -678,6 +678,7 @@ static int intel_vgpu_create(struct kobject *kobj, > struct mdev_device *mdev) > dev_name(mdev_dev(mdev))); > ret = 0; > > + mdev_set_class_id(mdev, MDEV_ID_VFIO); > out: > return ret; > } > diff --git a/drivers/s390/cio/vfio_ccw_ops.c > b/drivers/s390/cio/vfio_ccw_ops.c > index f0d71ab77c50..d258ef1fedb9 100644 > ---...
2019 Oct 23
2
[PATCH V5 1/6] mdev: class id support
...ls > @@ -170,6 +172,9 @@ that a driver should use to unregister itself with the mdev core driver:: > > extern void mdev_unregister_device(struct device *dev); > > +It is also required to specify the class_id in create() callback through:: > + > + int mdev_set_class(struct mdev_device *mdev, u16 id); > > Mediated Device Management Interface Through sysfs > ================================================== > diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c > index 343d79c1cb7e..6420f0dbd31b 100644 > --- a/drivers/gpu/drm/i...
2019 Oct 23
2
[PATCH V5 1/6] mdev: class id support
...ls > @@ -170,6 +172,9 @@ that a driver should use to unregister itself with the mdev core driver:: > > extern void mdev_unregister_device(struct device *dev); > > +It is also required to specify the class_id in create() callback through:: > + > + int mdev_set_class(struct mdev_device *mdev, u16 id); > > Mediated Device Management Interface Through sysfs > ================================================== > diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c > index 343d79c1cb7e..6420f0dbd31b 100644 > --- a/drivers/gpu/drm/i...
2019 Sep 24
1
[PATCH V2 2/8] mdev: class id support
...t; diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c > index 23aa3e50cbf8..f793252a3d2a 100644 > --- a/drivers/gpu/drm/i915/gvt/kvmgt.c > +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c > @@ -678,6 +678,7 @@ static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) > dev_name(mdev_dev(mdev))); > ret = 0; > > + mdev_set_class_id(mdev, MDEV_ID_VFIO); > out: > return ret; > } > diff --git a/drivers/s390/cio/vfio_ccw_ops.c b/drivers/s390/cio/vfio_ccw_ops.c > index f0d71ab77c50..d258ef1fedb9 100644 > --- a/dr...
2019 Oct 24
2
[PATCH V5 1/6] mdev: class id support
...nregister itself with the mdev core driver:: > >> > >> extern void mdev_unregister_device(struct device *dev); > >> > >> +It is also required to specify the class_id in create() callback through:: > >> + > >> + int mdev_set_class(struct mdev_device *mdev, u16 id); > >> > >> Mediated Device Management Interface Through sysfs > >> ================================================== > >> diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c > >> index 343d79c1cb7e.....
2019 Oct 24
2
[PATCH V5 1/6] mdev: class id support
...nregister itself with the mdev core driver:: > >> > >> extern void mdev_unregister_device(struct device *dev); > >> > >> +It is also required to specify the class_id in create() callback through:: > >> + > >> + int mdev_set_class(struct mdev_device *mdev, u16 id); > >> > >> Mediated Device Management Interface Through sysfs > >> ================================================== > >> diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c > >> index 343d79c1cb7e.....
2019 Oct 15
1
[PATCH V3 1/7] mdev: class id support
...lt;jasowang at redhat.com> wrote: > diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c > index b558d4cfd082..724e9b9841d8 100644 > --- a/drivers/vfio/mdev/mdev_core.c > +++ b/drivers/vfio/mdev/mdev_core.c > @@ -45,6 +45,12 @@ void mdev_set_drvdata(struct mdev_device *mdev, void *data) > } > EXPORT_SYMBOL(mdev_set_drvdata); > > +void mdev_set_class(struct mdev_device *mdev, u16 id) > +{ > + mdev->class_id = id; > +} > +EXPORT_SYMBOL(mdev_set_class); > + > struct device *mdev_dev(struct mdev_device *mdev) > { > r...
2019 Nov 04
1
[PATCH V7 1/6] mdev: class id support
...ls > @@ -170,6 +172,9 @@ that a driver should use to unregister itself with the mdev core driver:: > > extern void mdev_unregister_device(struct device *dev); > > +It is also required to specify the class_id in create() callback through:: > + > + int mdev_set_class(struct mdev_device *mdev, u16 id); > > Mediated Device Management Interface Through sysfs > ================================================== > diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c > index 343d79c1cb7e..6420f0dbd31b 100644 > --- a/drivers/gpu/drm/i...
2019 Sep 24
0
[PATCH V2 2/8] mdev: class id support
...e mdev core driver:: diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 23aa3e50cbf8..f793252a3d2a 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c @@ -678,6 +678,7 @@ static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) dev_name(mdev_dev(mdev))); ret = 0; + mdev_set_class_id(mdev, MDEV_ID_VFIO); out: return ret; } diff --git a/drivers/s390/cio/vfio_ccw_ops.c b/drivers/s390/cio/vfio_ccw_ops.c index f0d71ab77c50..d258ef1fedb9 100644 --- a/drivers/s390/cio/vfio_ccw_ops.c +++ b/drivers/s390/c...
2019 Nov 05
0
[PATCH V8 1/6] mdev: class id support
...this structure in the function calls @@ -170,6 +172,9 @@ that a driver should use to unregister itself with the mdev core driver:: extern void mdev_unregister_device(struct device *dev); +It is also required to specify the class_id in create() callback through:: + + int mdev_set_class(struct mdev_device *mdev, u16 id); Mediated Device Management Interface Through sysfs ================================================== diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 343d79c1cb7e..6420f0dbd31b 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/...
2019 Nov 04
0
[PATCH V7 1/6] mdev: class id support
...this structure in the function calls @@ -170,6 +172,9 @@ that a driver should use to unregister itself with the mdev core driver:: extern void mdev_unregister_device(struct device *dev); +It is also required to specify the class_id in create() callback through:: + + int mdev_set_class(struct mdev_device *mdev, u16 id); Mediated Device Management Interface Through sysfs ================================================== diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 343d79c1cb7e..6420f0dbd31b 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/...
2019 Oct 11
0
[PATCH V3 1/7] mdev: class id support
...==================== diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 343d79c1cb7e..17e9d4634c84 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c @@ -678,6 +678,7 @@ static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) dev_name(mdev_dev(mdev))); ret = 0; + mdev_set_class(mdev, MDEV_ID_VFIO); out: return ret; } diff --git a/drivers/s390/cio/vfio_ccw_ops.c b/drivers/s390/cio/vfio_ccw_ops.c index f0d71ab77c50..b5d223882c6c 100644 --- a/drivers/s390/cio/vfio_ccw_ops.c +++ b/drivers/s390/cio/...
2019 Oct 23
0
[PATCH V5 1/6] mdev: class id support
...this structure in the function calls @@ -170,6 +172,9 @@ that a driver should use to unregister itself with the mdev core driver:: extern void mdev_unregister_device(struct device *dev); +It is also required to specify the class_id in create() callback through:: + + int mdev_set_class(struct mdev_device *mdev, u16 id); Mediated Device Management Interface Through sysfs ================================================== diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 343d79c1cb7e..6420f0dbd31b 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/...
2019 Oct 24
0
[PATCH V5 1/6] mdev: class id support
...that a driver should use to unregister itself with the mdev core driver:: >> >> extern void mdev_unregister_device(struct device *dev); >> >> +It is also required to specify the class_id in create() callback through:: >> + >> + int mdev_set_class(struct mdev_device *mdev, u16 id); >> >> Mediated Device Management Interface Through sysfs >> ================================================== >> diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c >> index 343d79c1cb7e..6420f0dbd31b 100644 >&...
2019 Oct 16
0
[PATCH V3 1/7] mdev: class id support
...const struct mdev_parent_ops *ops); >> >> +It is also required to specify the class_id through:: >> + >> + extern int mdev_set_class(struct device *dev, u16 id); > Drop extern. > In actual API you have correct signature, i.e. struct mdev_device. > s/struct device/struct mdev_device. Yes, will fix. > >> + >> However, the mdev_parent_ops structure is not required in the function call >> that a driver should use to unregister itself with the mdev core driver:: >> >> extern void mdev_unregister_...
2019 Oct 24
0
[PATCH V5 1/6] mdev: class id support
...core driver:: > > >> > > >> extern void mdev_unregister_device(struct device *dev); > > >> > > >> +It is also required to specify the class_id in create() callback through:: > > >> + > > >> + int mdev_set_class(struct mdev_device *mdev, u16 id); > > >> > > >> Mediated Device Management Interface Through sysfs > > >> ================================================== > > >> diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c > > >...
2019 Oct 23
10
[PATCH V5 0/6] mdev based hardware virtio offloading support
...n ones. Pktgen test was done with virito-net + mvnet loop back device. Please review. [1] https://lkml.org/lkml/2019/10/22/262 [2] https://lkml.org/lkml/2019/10/15/1226 Changes from V4: - keep mdev_set_class() for the device that doesn't use device ops - use union for device ops pointer in mdev_device - introduce class specific helper for getting is device ops - use WARN_ON instead of BUG_ON in mdev_set_virtio_ops - explain details of get_mdev_features() and get_vendor_id() - distinguish the optional virito device ops from mandatory ones and make get_generation() optional - rename vfio_mdev...
2019 Oct 23
10
[PATCH V5 0/6] mdev based hardware virtio offloading support
...n ones. Pktgen test was done with virito-net + mvnet loop back device. Please review. [1] https://lkml.org/lkml/2019/10/22/262 [2] https://lkml.org/lkml/2019/10/15/1226 Changes from V4: - keep mdev_set_class() for the device that doesn't use device ops - use union for device ops pointer in mdev_device - introduce class specific helper for getting is device ops - use WARN_ON instead of BUG_ON in mdev_set_virtio_ops - explain details of get_mdev_features() and get_vendor_id() - distinguish the optional virito device ops from mandatory ones and make get_generation() optional - rename vfio_mdev...
2019 Nov 04
9
[PATCH V7 0/6] mdev based hardware virtio offloading support
...que name for id_table - move get_mdev_features() to be the first member of virtio_device_ops and more comments for it - typo fixes for the comments above virtio_mdev_ops Changes from V4: - keep mdev_set_class() for the device that doesn't use device ops - use union for device ops pointer in mdev_device - introduce class specific helper for getting is device ops - use WARN_ON instead of BUG_ON in mdev_set_virtio_ops - explain details of get_mdev_features() and get_vendor_id() - distinguish the optional virito device ops from mandatory ones and make get_generation() optional - rename vfio_mdev...