search for: mdev_set_iommu_device

Displaying 17 results from an estimated 17 matches for "mdev_set_iommu_device".

Did you mean: mdev_get_iommu_device
2019 Nov 25
0
[RFC V4 2/2] This commit introduced IFC operations for vdpa
...;name, "ifcvf-virtio_mdev")) > + mdev_virtio_set_class_id(mdev,MDEV_VIRTIO_CLASS_ID_VIRTIO); > + > + if (!strcmp(kobj->name, "ifcvf-vhost_mdev")) > + mdev_virtio_set_class_id(mdev,MDEV_VIRTIO_CLASS_ID_VHOST); > + > + mdev_set_drvdata(mdev, adapter); > + mdev_set_iommu_device(mdev_dev(mdev), dev); > + adapter->mdev_count--; > + To avoid confusion, it's better to call mdev_set_iommu_device() only for the case of vhost. For virtio, it doesn't depends on that to work. Thanks
2019 Sep 23
2
[PATCH 2/6] mdev: introduce device specific ops
...refixed by >>): In file included from include/linux/vfio_mdev.h:10:0, from <command-line>:0: >> include/linux/mdev.h:25:34: warning: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration int mdev_set_iommu_device(struct device *dev, struct device *iommu_device); ^~~~~~ >> include/linux/mdev.h:62:27: warning: 'struct kobject' declared inside parameter list will not be visible outside of this definition or declaration int (*create)(struct kobject *ko...
2019 Sep 23
2
[PATCH 2/6] mdev: introduce device specific ops
...refixed by >>): In file included from include/linux/vfio_mdev.h:10:0, from <command-line>:0: >> include/linux/mdev.h:25:34: warning: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration int mdev_set_iommu_device(struct device *dev, struct device *iommu_device); ^~~~~~ >> include/linux/mdev.h:62:27: warning: 'struct kobject' declared inside parameter list will not be visible outside of this definition or declaration int (*create)(struct kobject *ko...
2019 Sep 23
0
[PATCH 2/6] mdev: introduce device specific ops
...> In file included from include/linux/vfio_mdev.h:10:0, > from <command-line>:0: > >> include/linux/mdev.h:25:34: warning: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration > int mdev_set_iommu_device(struct device *dev, struct device *iommu_device); > ^~~~~~ > >> include/linux/mdev.h:62:27: warning: 'struct kobject' declared inside parameter list will not be visible outside of this definition or declaration > int (*create)(str...
2019 Sep 17
1
[RFC PATCH 2/2] mdev: introduce device specific ops
...les/vfio-mdev/mtty.c | 14 +++--- > 8 files changed, 113 insertions(+), 73 deletions(-) > diff --git a/include/linux/mdev.h b/include/linux/mdev.h > index f85045392120..3b8a76bc69cf 100644 > --- a/include/linux/mdev.h > +++ b/include/linux/mdev.h > @@ -27,27 +27,9 @@ int mdev_set_iommu_device(struct device *dev, struct device *iommu_device); > struct device *mdev_get_iommu_device(struct device *dev); > > /** > - * struct mdev_parent_ops - Structure to be registered for each parent device to > - * register the device to mdev module. > + * struct vfio_mdev_parent_ops...
2019 Sep 17
2
[RFC PATCH 2/2] mdev: introduce device specific ops
...s->mmap(mdev, vma); > } > > static const struct vfio_device_ops vfio_mdev_dev_ops = { > diff --git a/include/linux/mdev.h b/include/linux/mdev.h > index f85045392120..3b8a76bc69cf 100644 > --- a/include/linux/mdev.h > +++ b/include/linux/mdev.h > @@ -27,27 +27,9 @@ int mdev_set_iommu_device(struct device *dev, > struct device *iommu_device); > struct device *mdev_get_iommu_device(struct device *dev); > > /** > - * struct mdev_parent_ops - Structure to be registered for each parent > device to > - * register the device to mdev module. > + * struct vfio_mdev_p...
2019 Sep 17
2
[RFC PATCH 2/2] mdev: introduce device specific ops
...s->mmap(mdev, vma); > } > > static const struct vfio_device_ops vfio_mdev_dev_ops = { > diff --git a/include/linux/mdev.h b/include/linux/mdev.h > index f85045392120..3b8a76bc69cf 100644 > --- a/include/linux/mdev.h > +++ b/include/linux/mdev.h > @@ -27,27 +27,9 @@ int mdev_set_iommu_device(struct device *dev, > struct device *iommu_device); > struct device *mdev_get_iommu_device(struct device *dev); > > /** > - * struct mdev_parent_ops - Structure to be registered for each parent > device to > - * register the device to mdev module. > + * struct vfio_mdev_p...
2019 Oct 21
0
[RFC 2/2] vhost: IFC VF vdpa layer
...;> +??????? ret = -EINVAL; >>> +??????? goto out; >>> +??? } >>> + >>> +??? mdev_set_class_id(mdev, MDEV_ID_VHOST); >>> +??? mdev_set_dev_ops(mdev, &ifc_mdev_ops); >>> + >>> +??? mdev_set_drvdata(mdev, adapter); >>> +??? mdev_set_iommu_device(mdev_dev(mdev), dev); >>> + >>> +??? INIT_LIST_HEAD(&adapter->dma_maps); >>> +??? adapter->mdev_count--; >>> + >>> +out: >>> +??? mutex_unlock(&adapter->mdev_lock); >>> +??? return ret; >>> +} >>> + &g...
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 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
...mutex_lock(&adapter->mdev_lock); > + > + if (adapter->mdev_count < 1) { > + ret = -EINVAL; > + goto out; > + } > + > + mdev_set_class_id(mdev, MDEV_ID_VHOST); > + mdev_set_dev_ops(mdev, &ifc_mdev_ops); > + > + mdev_set_drvdata(mdev, adapter); > + mdev_set_iommu_device(mdev_dev(mdev), dev); > + > + INIT_LIST_HEAD(&adapter->dma_maps); > + adapter->mdev_count--; > + > +out: > + mutex_unlock(&adapter->mdev_lock); > + return ret; > +} > + > +static int ifcvf_mdev_remove(struct mdev_device *mdev) > +{ > + struct dev...
2019 Sep 12
0
[RFC PATCH 2/2] mdev: introduce device specific ops
...gt;ops->mmap(mdev, vma); + return ops->mmap(mdev, vma); } static const struct vfio_device_ops vfio_mdev_dev_ops = { diff --git a/include/linux/mdev.h b/include/linux/mdev.h index f85045392120..3b8a76bc69cf 100644 --- a/include/linux/mdev.h +++ b/include/linux/mdev.h @@ -27,27 +27,9 @@ int mdev_set_iommu_device(struct device *dev, struct device *iommu_device); struct device *mdev_get_iommu_device(struct device *dev); /** - * struct mdev_parent_ops - Structure to be registered for each parent device to - * register the device to mdev module. + * struct vfio_mdev_parent_ops - Structure to be registered...
2019 Sep 17
0
[RFC PATCH 2/2] mdev: introduce device specific ops
...} >> >> static const struct vfio_device_ops vfio_mdev_dev_ops = { >> diff --git a/include/linux/mdev.h b/include/linux/mdev.h >> index f85045392120..3b8a76bc69cf 100644 >> --- a/include/linux/mdev.h >> +++ b/include/linux/mdev.h >> @@ -27,27 +27,9 @@ int mdev_set_iommu_device(struct device *dev, >> struct device *iommu_device); >> struct device *mdev_get_iommu_device(struct device *dev); >> >> /** >> - * struct mdev_parent_ops - Structure to be registered for each parent >> device to >> - * register the device to mdev module...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...> + if (!strcmp(kobj->name, "ifcvf-virtio_mdev")) > + mdev_set_virtio_ops(mdev, &ifc_mdev_ops); > + > + if (!strcmp(kobj->name, "ifcvf-vhost_mdev")) > + mdev_set_vhost_ops(mdev, &ifc_mdev_ops); > + > + mdev_set_drvdata(mdev, adapter); > + mdev_set_iommu_device(mdev_dev(mdev), dev); > + adapter->mdev_count--; > + > +out: > + mutex_unlock(&adapter->mdev_lock); > + return ret; > +} > + > +static int ifcvf_mdev_remove(struct mdev_device *mdev) > +{ > + struct device *dev = mdev_parent_dev(mdev); > + struct pci_dev *...
2019 Sep 18
1
[RFC PATCH 2/2] mdev: introduce device specific ops
...atic const struct vfio_device_ops vfio_mdev_dev_ops = { > >> diff --git a/include/linux/mdev.h b/include/linux/mdev.h > >> index f85045392120..3b8a76bc69cf 100644 > >> --- a/include/linux/mdev.h > >> +++ b/include/linux/mdev.h > >> @@ -27,27 +27,9 @@ int mdev_set_iommu_device(struct device *dev, > >> struct device *iommu_device); > >> struct device *mdev_get_iommu_device(struct device *dev); > >> > >> /** > >> - * struct mdev_parent_ops - Structure to be registered for each parent > >> device to > >> - *...
2019 Sep 23
14
[PATCH 0/6] 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 23
14
[PATCH 0/6] 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