search for: mdev_id_vfio

Displaying 20 results from an estimated 47 matches for "mdev_id_vfio".

2019 Sep 24
1
[PATCH V2 2/8] mdev: class id support
...252a3d2a 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/cio/vfio_ccw_ops.c > @@ -129,6 +129,7 @@ static int vfio_ccw...
2019 Sep 25
1
[PATCH V2 2/8] mdev: class id support
...3d2a 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/cio/vfio_ccw_ops.c > @@ -129,6 +129,7 @@ static int vfi...
2019 Sep 24
0
[PATCH V2 2/8] mdev: class id support
...vt/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/cio/vfio_ccw_ops.c @@ -129,6 +129,7 @@ static int vfio_ccw_mdev_create(struct kobject *kobj, struc...
2019 Oct 11
0
[PATCH V3 1/7] mdev: class id support
...5/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/vfio_ccw_ops.c @@ -129,6 +129,7 @@ static int vfio_ccw_mdev_create(struct kobject *kobj, struc...
2019 Oct 11
0
[PATCH V3 4/7] mdev: introduce device specific ops
..._vgpu_dev_ops; + static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) { struct intel_vgpu *vgpu = NULL; @@ -678,7 +681,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); + mdev_set_class(mdev, MDEV_ID_VFIO, &intel_vfio_vgpu_dev_ops); out: return ret; } @@ -1599,20 +1602,21 @@ static const struct attribute_group *intel_vgpu_groups[] = { NULL, }; -static struct mdev_parent_ops intel_vgpu_ops = { - .mdev_attr_groups = intel_vgpu_groups, - .create...
2019 Oct 16
0
[PATCH V3 1/7] mdev: class id support
...vers/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/vfio_ccw_ops.c >...
2019 Sep 24
3
[PATCH V2 5/8] mdev: introduce device specific ops
...v_ops; > + > static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) > { > struct intel_vgpu *vgpu = NULL; > @@ -679,6 +682,7 @@ static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) > ret = 0; > > mdev_set_class_id(mdev, MDEV_ID_VFIO); > + mdev_set_dev_ops(mdev, &intel_vfio_vgpu_dev_ops); This seems rather unrefined. We're registering interdependent data in separate calls. All drivers need to make both of these calls. I'm not sure if this is a good idea, but what if we had: static const struct vfio_mdev_devi...
2019 Sep 24
3
[PATCH V2 5/8] mdev: introduce device specific ops
...v_ops; > + > static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) > { > struct intel_vgpu *vgpu = NULL; > @@ -679,6 +682,7 @@ static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) > ret = 0; > > mdev_set_class_id(mdev, MDEV_ID_VFIO); > + mdev_set_dev_ops(mdev, &intel_vfio_vgpu_dev_ops); This seems rather unrefined. We're registering interdependent data in separate calls. All drivers need to make both of these calls. I'm not sure if this is a good idea, but what if we had: static const struct vfio_mdev_devi...
2019 Sep 25
3
[PATCH V2 5/8] mdev: introduce device specific ops
...evice > > *mdev) > > > { > > > struct intel_vgpu *vgpu = NULL; > > > @@ -679,6 +682,7 @@ static int intel_vgpu_create(struct kobject *kobj, > > struct mdev_device *mdev) > > > ret = 0; > > > > > > mdev_set_class_id(mdev, MDEV_ID_VFIO); > > > + mdev_set_dev_ops(mdev, &intel_vfio_vgpu_dev_ops); > > > > This seems rather unrefined. We're registering interdependent data in > > separate calls. All drivers need to make both of these calls. I'm not > > sure if this is a good idea, but...
2019 Sep 25
3
[PATCH V2 5/8] mdev: introduce device specific ops
...evice > > *mdev) > > > { > > > struct intel_vgpu *vgpu = NULL; > > > @@ -679,6 +682,7 @@ static int intel_vgpu_create(struct kobject *kobj, > > struct mdev_device *mdev) > > > ret = 0; > > > > > > mdev_set_class_id(mdev, MDEV_ID_VFIO); > > > + mdev_set_dev_ops(mdev, &intel_vfio_vgpu_dev_ops); > > > > This seems rather unrefined. We're registering interdependent data in > > separate calls. All drivers need to make both of these calls. I'm not > > sure if this is a good idea, but...
2019 Oct 11
17
[PATCH V3 0/7] mdev based hardware virtio offloading support
Hi all: There are hardware that can do virtio datapath offloading while having its own control path. This path tries to implement a mdev based unified API to support using kernel virtio driver to drive those devices. This is done by introducing a new mdev transport for virtio (virtio_mdev) and register itself as a new kind of mdev driver. Then it provides a unified way for kernel virtio driver to
2019 Oct 11
17
[PATCH V3 0/7] mdev based hardware virtio offloading support
Hi all: There are hardware that can do virtio datapath offloading while having its own control path. This path tries to implement a mdev based unified API to support using kernel virtio driver to drive those devices. This is done by introducing a new mdev transport for virtio (virtio_mdev) and register itself as a new kind of mdev driver. Then it provides a unified way for kernel virtio driver to
2019 Sep 24
17
[PATCH V2 0/8] mdev based hardware virtio offloading support
Hi all: There are hardware that can do virtio datapath offloading while having its own control path. This path tries to implement a mdev based unified API to support using kernel virtio driver to drive those devices. This is done by introducing a new mdev transport for virtio (virtio_mdev) and register itself as a new kind of mdev driver. Then it provides a unified way for kernel virtio driver to
2019 Sep 24
17
[PATCH V2 0/8] mdev based hardware virtio offloading support
Hi all: There are hardware that can do virtio datapath offloading while having its own control path. This path tries to implement a mdev based unified API to support using kernel virtio driver to drive those devices. This is done by introducing a new mdev transport for virtio (virtio_mdev) and register itself as a new kind of mdev driver. Then it provides a unified way for kernel virtio driver to
2019 Sep 25
0
[PATCH V2 5/8] mdev: introduce device specific ops
...gpu_create(struct kobject *kobj, struct mdev_device > *mdev) > > { > > struct intel_vgpu *vgpu = NULL; > > @@ -679,6 +682,7 @@ static int intel_vgpu_create(struct kobject *kobj, > struct mdev_device *mdev) > > ret = 0; > > > > mdev_set_class_id(mdev, MDEV_ID_VFIO); > > + mdev_set_dev_ops(mdev, &intel_vfio_vgpu_dev_ops); > > This seems rather unrefined. We're registering interdependent data in > separate calls. All drivers need to make both of these calls. I'm not > sure if this is a good idea, but what if we had: > >...
2019 Sep 17
1
[RFC PATCH 1/2] mdev: device id support
...onst > struct mdev_parent_ops *ops) > put_device(dev); > return ret; > } > -EXPORT_SYMBOL(mdev_register_device); > + > +int mdev_register_vfio_device(struct device *dev, > + const struct mdev_parent_ops *ops) > +{ > + return mdev_register_device(dev, ops, MDEV_ID_VFIO); > +} > +EXPORT_SYMBOL(mdev_register_vfio_device); > > /* > * mdev_unregister_device : Unregister a parent device > diff --git a/drivers/vfio/mdev/mdev_driver.c > b/drivers/vfio/mdev/mdev_driver.c > index 0d3223aee20b..fd5e9541d18e 100644 > --- a/drivers/vfio/mdev/md...
2019 Sep 24
0
[PATCH V2 5/8] mdev: introduce device specific ops
...vfio_mdev_device_ops intel_vfio_vgpu_dev_ops; + static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) { struct intel_vgpu *vgpu = NULL; @@ -679,6 +682,7 @@ static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) ret = 0; mdev_set_class_id(mdev, MDEV_ID_VFIO); + mdev_set_dev_ops(mdev, &intel_vfio_vgpu_dev_ops); out: return ret; } @@ -1601,20 +1605,21 @@ static const struct attribute_group *intel_vgpu_groups[] = { NULL, }; -static struct mdev_parent_ops intel_vgpu_ops = { - .mdev_attr_groups = intel_vgpu_groups, - .create = intel_vg...
2019 Oct 17
0
[PATCH V3 1/7] mdev: class id support
On 2019/10/16 ??12:57, Parav Pandit wrote: >> +static struct mdev_class_id id_table[] = { > static const > >> + { MDEV_ID_VFIO }, > I guess you don't need extra braces for each entry. > Since this enum represents MDEV class id, it better to name it as MDEV_CLASS_ID_VFIO. > (Similar to PCI_VENDOR_ID, PCI_DEVICE_ID).. > Gcc start to complain like: warning: missing braces around initializer [-Wmissing-brace...
2019 Sep 24
0
[PATCH 1/6] mdev: class id support
...nt_ops *ops) >> put_device(dev); >> return ret; >> } >> -EXPORT_SYMBOL(mdev_register_device); >> + >> +int mdev_register_vfio_device(struct device *dev, >> + const struct mdev_parent_ops *ops) { >> + return mdev_register_device(dev, ops, MDEV_ID_VFIO); } >> +EXPORT_SYMBOL(mdev_register_vfio_device); >> >> /* >> * mdev_unregister_device : Unregister a parent device diff --git >> a/drivers/vfio/mdev/mdev_driver.c b/drivers/vfio/mdev/mdev_driver.c index >> 0d3223aee20b..b70bbebc9dd3 100644 >> --- a/driv...
2019 Oct 17
2
[PATCH V3 4/7] mdev: introduce device specific ops
...struct virtio_mdev_ops virtio_ops; >>>>> }; >>>>> }; >>>>> >>>>> Maybe even: >>>>> >>>>> struct vfio_mdev_ops *mdev_get_vfio_ops(struct mdev_device *mdev) { >>>>> BUG_ON(mdev->class.id != MDEV_ID_VFIO); >>>>> return &mdev->class.vfio_ops; >>>>> } >>>>> >>>>> The match callback would of course just use the mdev->class.id value. >>>>> Functionally equivalent, but maybe better type characteristics. >>>&gt...