[PATCH] drm/gma500: Fix comment typo

2022-08-04 Thread Jason Wang
The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang --- drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/drm/gma500/cdv_intel_dp.c index bb2e9d64018a

[PATCH] drm/panel: nt35510: Fix comment typo

2022-08-04 Thread Jason Wang
The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang --- drivers/gpu/drm/panel/panel-novatek-nt35510.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/drm/panel/panel-novatek-nt35510

[PATCH] drm/mipi-dsi: Fix comment typo

2022-08-04 Thread Jason Wang
The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang --- drivers/gpu/drm/drm_mipi_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index c40bde96cfdf..fd2790a5664d 100644

[PATCH] drm/display: Fix comment typo

2022-08-04 Thread Jason Wang
The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang --- drivers/gpu/drm/display/drm_dp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c index

[PATCH] dma-buf: heaps: Fix comment typo

2022-08-03 Thread Jason Wang
The double `by' is duplicated in the comment, remove one. Signed-off-by: Jason Wang --- drivers/dma-buf/heaps/cma_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma-buf/heaps/cma_heap.c b/drivers/dma-buf/heaps/cma_heap.c index 28fb04eccdd0..cd386ce639f3

[PATCH] drm/msm/dpu: Fix comment typo

2022-07-25 Thread Jason Wang
The double `be' is duplicated in the comment, remove one. Signed-off-by: Jason Wang --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1

[PATCH] drm/i915/selftests: Fix comment typo

2022-07-20 Thread Jason Wang
Fix the double `wait' typo in comment. Signed-off-by: Jason Wang --- drivers/gpu/drm/i915/selftests/i915_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c index

[PATCH] drm/radeon: Fix comment typo

2022-07-20 Thread Jason Wang
The double `have' is duplicated in line 696, remove one. Signed-off-by: Jason Wang --- drivers/gpu/drm/radeon/radeon_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index 84843b3b3aef

[PATCH] drm/amdgpu: Fix comment typo

2022-07-20 Thread Jason Wang
The double `to' is duplicated in the comment, remove one. Signed-off-by: Jason Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index

[PATCH] drm/i915/gt: Remove unneeded semicolon

2022-07-20 Thread Jason Wang
The semicolon after a code block end symbol `}' is unneeded, remove it. Signed-off-by: Jason Wang --- drivers/gpu/drm/i915/gt/intel_migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c

[PATCH] drm/i915/selftests: Fix comment typo

2022-07-19 Thread Jason Wang
The double `wait' is duplicated in line 974, remove one. Signed-off-by: Jason Wang --- drivers/gpu/drm/i915/selftests/i915_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c

[PATCH] dma-buf: Fix comment typo

2022-07-19 Thread Jason Wang
The double `have' is duplicated in line 696, remove one. Signed-off-by: Jason Wang --- drivers/gpu/drm/radeon/radeon_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index 84843b3b3aef

[PATCH] drm/i915/gt: Remove unneeded semicolon

2022-07-16 Thread Jason Wang
The semicolon after the `}' in line 648 is unneeded. Signed-off-by: Jason Wang --- drivers/gpu/drm/i915/gt/intel_migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c index 2c35324b5f68

Re: [PATCH v2 2/2] virtio: virtio_has_iommu_quirk -> virtio_has_dma_quirk

2020-06-28 Thread Jason Wang
k * @vdev: the device */ -static inline bool virtio_has_iommu_quirk(const struct virtio_device *vdev) +static inline bool virtio_has_dma_quirk(const struct virtio_device *vdev) { /* * Note the reverse polarity of the quirk feature (compared to most

Re: [PATCH V13 4/6] mdev: introduce mediated virtio bus

2019-11-20 Thread Jason Wang
On 2019/11/20 下午9:49, Jason Gunthorpe wrote: On Wed, Nov 20, 2019 at 10:14:26AM +0800, Jason Wang wrote: I don't quite get the question here. In the driver model the bus_type and foo_device are closely linked. I don't get the definition of "closely linked" here. Do you thi

Re: [PATCH V13 4/6] mdev: introduce mediated virtio bus

2019-11-19 Thread Jason Wang
On 2019/11/19 下午10:14, Jason Gunthorpe wrote: On Tue, Nov 19, 2019 at 10:02:08PM +0800, Jason Wang wrote: On 2019/11/19 下午8:38, Jason Gunthorpe wrote: On Tue, Nov 19, 2019 at 10:41:31AM +0800, Jason Wang wrote: On 2019/11/19 上午4:28, Jason Gunthorpe wrote: On Mon, Nov 18, 2019 at 03:27:13PM

Re: [PATCH V13 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-19 Thread Jason Wang
On 2019/11/19 下午8:40, Jason Gunthorpe wrote: On Tue, Nov 19, 2019 at 11:03:39AM +0800, Jason Wang wrote: Also, see the other conversations we are having about a "virtual" bus and devices. I do not want to have two different ways of doing the same thing in the kernel at the same t

Re: [PATCH V13 4/6] mdev: introduce mediated virtio bus

2019-11-19 Thread Jason Wang
On 2019/11/19 下午8:38, Jason Gunthorpe wrote: On Tue, Nov 19, 2019 at 10:41:31AM +0800, Jason Wang wrote: On 2019/11/19 上午4:28, Jason Gunthorpe wrote: On Mon, Nov 18, 2019 at 03:27:13PM -0500, Michael S. Tsirkin wrote: On Mon, Nov 18, 2019 at 01:41:00PM +, Jason Gunthorpe wrote: On Mon

Re: [PATCH V13 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-18 Thread Jason Wang
On 2019/11/18 下午11:45, Cornelia Huck wrote: On Mon, 18 Nov 2019 18:59:23 +0800 Jason Wang wrote: [Note: I have not looked into the reworked architecture of this *at all* so far; just something that I noted...] This sample driver creates mdev device that simulate virtio net device over

Re: [PATCH V13 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-18 Thread Jason Wang
On 2019/11/18 下午11:17, Greg KH wrote: On Mon, Nov 18, 2019 at 06:59:23PM +0800, Jason Wang wrote: +static void mvnet_device_release(struct device *dev) +{ + dev_dbg(dev, "mvnet: released\n"); +} We used to have documentation in the kernel source tree that said that whenever

Re: [PATCH V13 4/6] mdev: introduce mediated virtio bus

2019-11-18 Thread Jason Wang
On 2019/11/19 上午4:28, Jason Gunthorpe wrote: On Mon, Nov 18, 2019 at 03:27:13PM -0500, Michael S. Tsirkin wrote: On Mon, Nov 18, 2019 at 01:41:00PM +, Jason Gunthorpe wrote: On Mon, Nov 18, 2019 at 06:59:21PM +0800, Jason Wang wrote: +struct bus_type mdev_virtio_bus_type; + +struct

Re: [PATCH V13 4/6] mdev: introduce mediated virtio bus

2019-11-18 Thread Jason Wang
On 2019/11/18 下午9:41, Jason Gunthorpe wrote: On Mon, Nov 18, 2019 at 06:59:21PM +0800, Jason Wang wrote: +struct bus_type mdev_virtio_bus_type; + +struct mdev_virtio_device { + struct mdev_device mdev; + const struct mdev_virtio_ops *ops; + u16 class_id; +}; This seems

[PATCH V13 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-18 Thread Jason Wang
'virtio' type is supported right now. I plan to add 'vhost' type on top which requires some virtual IOMMU implemented in this sample driver. Signed-off-by: Jason Wang --- MAINTAINERS| 1 + samples/Kconfig| 10 + samples/vfio-mdev/Makefile

[PATCH V13 4/6] mdev: introduce mediated virtio bus

2019-11-18 Thread Jason Wang
This patch implements a mediated virtio bus over mdev framework. This will be used by the future virtio-mdev and vhost-mdev on top to allow driver from either userspace or kernel to control the device which is capable of offloading virtio datapath. Signed-off-by: Jason Wang --- MAINTAINERS

[PATCH V13 5/6] virtio: introduce a mdev based transport

2019-11-18 Thread Jason Wang
the device with mdev based config ops. This means it is a software transport between mdev driver and mdev device. The transport was implemented through bus_ops of mdev parent. Signed-off-by: Jason Wang --- drivers/virtio/Kconfig | 13 ++ drivers/virtio/Makefile | 1 + drivers/virtio

[PATCH V13 2/6] mdev: split out VFIO bus specific parent ops

2019-11-18 Thread Jason Wang
and place the VFIO specific callbacks there like: struct mdev_vfio { struct mdev_device mdev; const struct mdev_vfio_ops *ops; }; Helpers for setting and getting the ops were introduced to support mdev vfio device to set ops and vfio mdev driver to use the ops. Signed-off-by: Jason Wang

[PATCH V13 3/6] mdev: move to drivers/

2019-11-18 Thread Jason Wang
Mdev now is nothing VFIO specific, let's move it to upper directory. Signed-off-by: Jason Wang --- MAINTAINERS | 7 +-- drivers/Kconfig | 2 ++ drivers/Makefile | 1 + drivers/mdev/Kconfig

[PATCH V13 1/6] mdev: make mdev bus agnostic

2019-11-18 Thread Jason Wang
mdev_vfio module - require to specify the type of bus when registering mdev device and mdev driver With those modifications mdev become a generic module that could be used by multiple types of virtual buses and devices. Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst

[PATCH V13 0/6] mdev based hardware virtio offloading support

2019-11-18 Thread Jason Wang
ders - drop the mdev_set_dma_ops() - use device_ops to implement the transport API, then it's not a part of UAPI any more - use GFP_ATOMIC in mvnet sample device and other tweaks - set_vring_base/get_vring_base support for mvnet device Jason Wang (6): mdev: make mdev bus agnostic mdev: split

Re: [PATCH V12 5/6] virtio: introduce a mdev based transport

2019-11-18 Thread Jason Wang
On 2019/11/18 下午6:44, Michael S. Tsirkin wrote: +static const struct mdev_virtio_class_id virtio_id_table[] = { + { MDEV_VIRTIO_CLASS_ID_VIRTIO }, + { 0 }, +}; + Do we still need the class ID? It's a virtio mdev bus, do we need a virtio class as well? If we want to have auto

Re: [PATCH V12 0/6] mdev based hardware virtio offloading support

2019-11-18 Thread Jason Wang
On 2019/11/18 下午2:16, Jason Wang wrote: Hi all: There are hardwares 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

[PATCH V12 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-17 Thread Jason Wang
'virtio' type is supported right now. I plan to add 'vhost' type on top which requires some virtual IOMMU implemented in this sample driver. Signed-off-by: Jason Wang --- MAINTAINERS| 1 + samples/Kconfig| 10 + samples/vfio-mdev/Makefile

[PATCH V12 4/6] mdev: introduce mediated virtio bus

2019-11-17 Thread Jason Wang
This patch implements a mediated virtio bus over mdev framework. This will be used by the future virtio-mdev and vhost-mdev on top to allow driver from either userspace or kernel to control the device which is capable of offloading virtio datapath. Signed-off-by: Jason Wang --- MAINTAINERS

[PATCH V12 5/6] virtio: introduce a mdev based transport

2019-11-17 Thread Jason Wang
the device with mdev based config ops. This means it is a software transport between mdev driver and mdev device. The transport was implemented through bus_ops of mdev parent. Signed-off-by: Jason Wang --- drivers/virtio/Kconfig | 13 ++ drivers/virtio/Makefile | 1 + drivers/virtio

[PATCH V12 3/6] mdev: move to drivers/

2019-11-17 Thread Jason Wang
Mdev now is nothing VFIO specific, let's move it to upper directory. Signed-off-by: Jason Wang --- MAINTAINERS | 7 +-- drivers/Kconfig | 2 ++ drivers/Makefile | 1 + drivers/mdev/Kconfig

[PATCH V12 1/6] mdev: make mdev bus agnostic

2019-11-17 Thread Jason Wang
mdev_vfio module - require to specify the type of bus when registering mdev device and mdev driver With those modifications mdev become a generic module that could be used by multiple types of virtual buses and devices. Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst

[PATCH V12 2/6] mdev: split out VFIO bus specific parent ops

2019-11-17 Thread Jason Wang
and place the VFIO specific callbacks there like: struct mdev_vfio { struct mdev_device mdev; const struct mdev_vfio_ops *ops; }; Helpers for setting and getting the ops were introduced to support mdev vfio device to set ops and vfio mdev driver to use the ops. Signed-off-by: Jason Wang

[PATCH V12 0/6] mdev based hardware virtio offloading support

2019-11-17 Thread Jason Wang
implement the transport API, then it's not a part of UAPI any more - use GFP_ATOMIC in mvnet sample device and other tweaks - set_vring_base/get_vring_base support for mvnet device Jason Wang (6): mdev: make mdev bus agnostic mdev: split out VFIO bus specific parent ops mdev: move to dr

[PATCH V11 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-07 Thread Jason Wang
'virtio' type is supported right now. I plan to add 'vhost' type on top which requires some virtual IOMMU implemented in this sample driver. Signed-off-by: Jason Wang --- MAINTAINERS| 1 + samples/Kconfig| 10 + samples/vfio-mdev/Makefile

[PATCH V11 5/6] virtio: introduce a mdev based transport

2019-11-07 Thread Jason Wang
the device with mdev based config ops. This means it is a software transport between mdev driver and mdev device. The transport was implemented through virtio device specific ops. Reviewed-by: Cornelia Huck Signed-off-by: Jason Wang --- drivers/virtio/Kconfig | 13 ++ drivers/virtio/Makefile

[PATCH V11 4/6] mdev: introduce virtio device and its device ops

2019-11-07 Thread Jason Wang
This patch implements basic support for mdev driver that supports virtio transport for kernel virtio driver. Reviewed-by: Cornelia Huck Signed-off-by: Jason Wang --- MAINTAINERS | 1 + drivers/vfio/mdev/mdev_core.c| 21 + drivers/vfio/mdev/mdev_private.h | 2

[PATCH V11 3/6] mdev: introduce device specific ops

2019-11-07 Thread Jason Wang
to be used by vfio-mdev and virtio-mdev. Reviewed-by: Parav Pandit Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst | 35 + MAINTAINERS | 1 + drivers/gpu/drm/i915/gvt/kvmgt.c | 18 --- drivers/s390/cio

[PATCH V11 1/6] mdev: class id support

2019-11-07 Thread Jason Wang
. So this patch adds id_table to mdev_driver and class_id for mdev device with the match method for mdev bus. Reviewed-by: Parav Pandit Reviewed-by: Cornelia Huck Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst | 5 drivers/gpu/drm/i915/gvt/kvmgt.c

[PATCH V11 2/6] modpost: add support for mdev class id

2019-11-07 Thread Jason Wang
Add support to parse mdev class id table. Reviewed-by: Parav Pandit Reviewed-by: Cornelia Huck Signed-off-by: Jason Wang --- drivers/vfio/mdev/vfio_mdev.c | 2 ++ scripts/mod/devicetable-offsets.c | 3 +++ scripts/mod/file2alias.c | 11 +++ 3 files changed, 16

[PATCH V11 0/6] mdev based hardware virtio offloading support

2019-11-07 Thread Jason Wang
ks - set_vring_base/get_vring_base support for mvnet device Jason Wang (6): mdev: class id support modpost: add support for mdev class id mdev: introduce device specific ops mdev: introduce virtio device and its device ops virtio: introduce a mdev based transport docs: sample driver to demons

Re: [PATCH V9 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-07 Thread Jason Wang
On 2019/11/7 上午6:58, Alex Williamson wrote: On Wed, 6 Nov 2019 14:50:30 -0800 Randy Dunlap wrote: On 11/5/19 11:05 PM, Jason Wang wrote: diff --git a/samples/Kconfig b/samples/Kconfig index c8dacb4dda80..13a2443e18e0 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -131,6 +131,16

Re: [PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-07 Thread Jason Wang
On 2019/11/7 下午9:50, Michael S. Tsirkin wrote: On Thu, Nov 07, 2019 at 09:32:29PM +0800, Jason Wang wrote: On 2019/11/7 下午9:08, Michael S. Tsirkin wrote: On Thu, Nov 07, 2019 at 08:43:29PM +0800, Jason Wang wrote: On 2019/11/7 下午7:21, Michael S. Tsirkin wrote: On Thu, Nov 07, 2019 at 06:18

Re: [PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-07 Thread Jason Wang
On 2019/11/7 下午9:08, Michael S. Tsirkin wrote: On Thu, Nov 07, 2019 at 08:47:06PM +0800, Jason Wang wrote: On 2019/11/7 下午8:43, Jason Wang wrote: On 2019/11/7 下午7:21, Michael S. Tsirkin wrote: On Thu, Nov 07, 2019 at 06:18:45PM +0800, Jason Wang wrote: On 2019/11/7 下午5:08, Michael S

Re: [PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-07 Thread Jason Wang
On 2019/11/7 下午9:08, Michael S. Tsirkin wrote: On Thu, Nov 07, 2019 at 08:43:29PM +0800, Jason Wang wrote: On 2019/11/7 下午7:21, Michael S. Tsirkin wrote: On Thu, Nov 07, 2019 at 06:18:45PM +0800, Jason Wang wrote: On 2019/11/7 下午5:08, Michael S. Tsirkin wrote: On Wed, Nov 06, 2019 at 09:35

Re: [PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-07 Thread Jason Wang
On 2019/11/7 下午8:43, Jason Wang wrote: On 2019/11/7 下午7:21, Michael S. Tsirkin wrote: On Thu, Nov 07, 2019 at 06:18:45PM +0800, Jason Wang wrote: On 2019/11/7 下午5:08, Michael S. Tsirkin wrote: On Wed, Nov 06, 2019 at 09:35:31PM +0800, Jason Wang wrote: This sample driver creates mdev device

Re: [PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-07 Thread Jason Wang
On 2019/11/7 下午7:21, Michael S. Tsirkin wrote: On Thu, Nov 07, 2019 at 06:18:45PM +0800, Jason Wang wrote: On 2019/11/7 下午5:08, Michael S. Tsirkin wrote: On Wed, Nov 06, 2019 at 09:35:31PM +0800, Jason Wang wrote: This sample driver creates mdev device that simulate virtio net device over

Re: [PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-07 Thread Jason Wang
On 2019/11/7 下午5:08, Michael S. Tsirkin wrote: On Wed, Nov 06, 2019 at 09:35:31PM +0800, Jason Wang wrote: This sample driver creates mdev device that simulate virtio net device over virtio mdev transport. The device is implemented through vringh and workqueue. A device specific dma ops

Re: [PATCH V8 0/6] mdev based hardware virtio offloading support

2019-11-06 Thread Jason Wang
On 2019/11/7 上午5:13, Alex Williamson wrote: On Wed, 6 Nov 2019 14:25:23 -0500 "Michael S. Tsirkin" wrote: On Wed, Nov 06, 2019 at 12:03:12PM -0700, Alex Williamson wrote: On Wed, 6 Nov 2019 11:56:46 +0800 Jason Wang wrote: On 2019/11/6 上午1:58, Alex Williamson wrote: On T

[PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-06 Thread Jason Wang
'virtio' type is supported right now. I plan to add 'vhost' type on top which requires some virtual IOMMU implemented in this sample driver. Acked-by: Cornelia Huck Signed-off-by: Jason Wang --- MAINTAINERS| 1 + samples/Kconfig| 10 + samples/vfio-mdev/Makefile

[PATCH V10 5/6] virtio: introduce a mdev based transport

2019-11-06 Thread Jason Wang
the device with mdev based config ops. This means it is a software transport between mdev driver and mdev device. The transport was implemented through virtio device specific ops. Reviewed-by: Cornelia Huck Signed-off-by: Jason Wang --- drivers/virtio/Kconfig | 13 ++ drivers/virtio/Makefile

[PATCH V10 4/6] mdev: introduce virtio device and its device ops

2019-11-06 Thread Jason Wang
This patch implements basic support for mdev driver that supports virtio transport for kernel virtio driver. Reviewed-by: Cornelia Huck Signed-off-by: Jason Wang --- MAINTAINERS | 1 + drivers/vfio/mdev/mdev_core.c| 21 + drivers/vfio/mdev/mdev_private.h | 2

[PATCH V10 3/6] mdev: introduce device specific ops

2019-11-06 Thread Jason Wang
to be used by vfio-mdev and virtio-mdev. Reviewed-by: Parav Pandit Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst | 35 + MAINTAINERS | 1 + drivers/gpu/drm/i915/gvt/kvmgt.c | 18 --- drivers/s390/cio

[PATCH V10 2/6] modpost: add support for mdev class id

2019-11-06 Thread Jason Wang
Add support to parse mdev class id table. Reviewed-by: Parav Pandit Reviewed-by: Cornelia Huck Signed-off-by: Jason Wang --- drivers/vfio/mdev/vfio_mdev.c | 2 ++ scripts/mod/devicetable-offsets.c | 3 +++ scripts/mod/file2alias.c | 11 +++ 3 files changed, 16

[PATCH V10 1/6] mdev: class id support

2019-11-06 Thread Jason Wang
. So this patch adds id_table to mdev_driver and class_id for mdev device with the match method for mdev bus. Reviewed-by: Parav Pandit Reviewed-by: Cornelia Huck Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst | 5 drivers/gpu/drm/i915/gvt/kvmgt.c

[PATCH V10 0/6] mdev based hardware virtio offloading support

2019-11-06 Thread Jason Wang
e_ops into seperate headers - drop the mdev_set_dma_ops() - use device_ops to implement the transport API, then it's not a part of UAPI any more - use GFP_ATOMIC in mvnet sample device and other tweaks - set_vring_base/get_vring_base support for mvnet device Jason Wang (6): mdev: class id support m

Re: [PATCH V9 5/6] virtio: introduce a mdev based transport

2019-11-06 Thread Jason Wang
On 2019/11/6 下午7:00, Cornelia Huck wrote: On Wed, 6 Nov 2019 15:05:47 +0800 Jason Wang wrote: This patch introduces a new mdev transport for virtio. This is used to use kernel virtio driver to drive the mediated device that is capable of populating virtqueue directly. A new virtio-mdev

[PATCH V9 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-05 Thread Jason Wang
'virtio' type is supported right now. I plan to add 'vhost' type on top which requires some virtual IOMMU implemented in this sample driver. Acked-by: Cornelia Huck Signed-off-by: Jason Wang --- MAINTAINERS| 1 + samples/Kconfig| 10 + samples/vfio-mdev/Makefile

[PATCH V9 5/6] virtio: introduce a mdev based transport

2019-11-05 Thread Jason Wang
the device with mdev based config ops. This means it is a software transport between mdev driver and mdev device. The transport was implemented through device specific ops which is a part of mdev_parent_ops now. Signed-off-by: Jason Wang --- drivers/virtio/Kconfig | 13 ++ drivers/virtio

[PATCH V9 4/6] mdev: introduce virtio device and its device ops

2019-11-05 Thread Jason Wang
This patch implements basic support for mdev driver that supports virtio transport for kernel virtio driver. Signed-off-by: Jason Wang --- MAINTAINERS | 1 + drivers/vfio/mdev/mdev_core.c| 21 + drivers/vfio/mdev/mdev_private.h | 2 + include/linux/mdev.h

[PATCH V9 3/6] mdev: introduce device specific ops

2019-11-05 Thread Jason Wang
to be used by vfio-mdev and virtio-mdev. Reviewed-by: Parav Pandit Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst | 35 + MAINTAINERS | 1 + drivers/gpu/drm/i915/gvt/kvmgt.c | 18 --- drivers/s390/cio

[PATCH V9 2/6] modpost: add support for mdev class id

2019-11-05 Thread Jason Wang
Add support to parse mdev class id table. Reviewed-by: Parav Pandit Reviewed-by: Cornelia Huck Signed-off-by: Jason Wang --- drivers/vfio/mdev/vfio_mdev.c | 2 ++ scripts/mod/devicetable-offsets.c | 3 +++ scripts/mod/file2alias.c | 11 +++ 3 files changed, 16

[PATCH V9 1/6] mdev: class id support

2019-11-05 Thread Jason Wang
. So this patch adds id_table to mdev_driver and class_id for mdev device with the match method for mdev bus. Reviewed-by: Parav Pandit Reviewed-by: Cornelia Huck Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst | 5 drivers/gpu/drm/i915/gvt/kvmgt.c

[PATCH V9 0/6] mdev based hardware virtio offloading support

2019-11-05 Thread Jason Wang
ot a part of UAPI any more - use GFP_ATOMIC in mvnet sample device and other tweaks - set_vring_base/get_vring_base support for mvnet device Jason Wang (6): mdev: class id support modpost: add support for mdev class id mdev: introduce device specific ops mdev: introduce virtio device and

Re: [PATCH V8 0/6] mdev based hardware virtio offloading support

2019-11-05 Thread Jason Wang
On 2019/11/6 上午1:58, Alex Williamson wrote: On Tue, 5 Nov 2019 17:32:34 +0800 Jason Wang wrote: Hi all: There are hardwares 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

Re: [PATCH V8 4/6] mdev: introduce virtio device and its device ops

2019-11-05 Thread Jason Wang
On 2019/11/6 上午1:47, Alex Williamson wrote: +#define VIRTIO_MDEV_DEVICE_API_STRING "virtio-mdev" +#define VIRTIO_MDEV_F_VERSION_1 0x1 This entire concept of VIRTIO_MDEV_F_VERSION_1 is gone now, right? Let's remove it here and below. Thanks, Alex Yes, will fix. Thanks

Re: [PATCH V8 3/6] mdev: introduce device specific ops

2019-11-05 Thread Jason Wang
On 2019/11/6 上午2:28, Cornelia Huck wrote: On Tue, 5 Nov 2019 10:44:18 -0700 Alex Williamson wrote: On Tue, 5 Nov 2019 17:50:25 +0100 Cornelia Huck wrote: On Tue, 5 Nov 2019 17:32:37 +0800 Jason Wang wrote: Currently, except for the create and remove, the rest of mdev_parent_ops

[PATCH V8 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-05 Thread Jason Wang
'virtio' type is supported right now. I plan to add 'vhost' type on top which requires some virtual IOMMU implemented in this sample driver. Signed-off-by: Jason Wang --- MAINTAINERS| 1 + samples/Kconfig| 7 + samples/vfio-mdev/Makefile | 1 + samples/vfio-mdev

[PATCH V8 5/6] virtio: introduce a mdev based transport

2019-11-05 Thread Jason Wang
the device with mdev based config ops. This means it is a software transport between mdev driver and mdev device. The transport was implemented through device specific ops which is a part of mdev_parent_ops now. Signed-off-by: Jason Wang --- drivers/virtio/Kconfig | 7 + drivers/virtio

[PATCH V8 4/6] mdev: introduce virtio device and its device ops

2019-11-05 Thread Jason Wang
This patch implements basic support for mdev driver that supports virtio transport for kernel virtio driver. Signed-off-by: Jason Wang --- drivers/vfio/mdev/mdev_core.c| 21 + drivers/vfio/mdev/mdev_private.h | 2 + include/linux/mdev.h | 6 ++ include/linux

[PATCH V8 3/6] mdev: introduce device specific ops

2019-11-05 Thread Jason Wang
to be used by vfio-mdev and virtio-mdev. Reviewed-by: Parav Pandit Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst | 35 + MAINTAINERS | 1 + drivers/gpu/drm/i915/gvt/kvmgt.c | 18 --- drivers/s390/cio

[PATCH V8 2/6] modpost: add support for mdev class id

2019-11-05 Thread Jason Wang
Add support to parse mdev class id table. Reviewed-by: Parav Pandit Signed-off-by: Jason Wang --- drivers/vfio/mdev/vfio_mdev.c | 2 ++ scripts/mod/devicetable-offsets.c | 3 +++ scripts/mod/file2alias.c | 11 +++ 3 files changed, 16 insertions(+) diff --git a/drivers

[PATCH V8 0/6] mdev based hardware virtio offloading support

2019-11-05 Thread Jason Wang
then it's not a part of UAPI any more - use GFP_ATOMIC in mvnet sample device and other tweaks - set_vring_base/get_vring_base support for mvnet device Jason Wang (6): mdev: class id support modpost: add support for mdev class id mdev: introduce device specific ops mdev: introduce virtio

[PATCH V8 1/6] mdev: class id support

2019-11-05 Thread Jason Wang
. So this patch adds id_table to mdev_driver and class_id for mdev device with the match method for mdev bus. Reviewed-by: Parav Pandit Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst | 5 drivers/gpu/drm/i915/gvt/kvmgt.c | 1 + drivers/s390/cio

Re: [PATCH V7 4/6] mdev: introduce virtio device and its device ops

2019-11-04 Thread Jason Wang
On 2019/11/5 下午12:39, Alex Williamson wrote: On Tue, 5 Nov 2019 11:52:41 +0800 Jason Wang wrote: On 2019/11/5 上午5:50, Alex Williamson wrote: On Mon, 4 Nov 2019 20:39:50 +0800 Jason Wang wrote: This patch implements basic support for mdev driver that supports virtio transport

Re: [PATCH V7 4/6] mdev: introduce virtio device and its device ops

2019-11-04 Thread Jason Wang
On 2019/11/5 上午5:50, Alex Williamson wrote: On Mon, 4 Nov 2019 20:39:50 +0800 Jason Wang wrote: This patch implements basic support for mdev driver that supports virtio transport for kernel virtio driver. Signed-off-by: Jason Wang --- drivers/vfio/mdev/mdev_core.c| 20

Re: [PATCH V7 3/6] mdev: introduce device specific ops

2019-11-04 Thread Jason Wang
On 2019/11/5 上午5:50, Alex Williamson wrote: EXPORT_SYMBOL(mdev_set_drvdata); + Extra whitespace /* Specify the class for the mdev device, this must be called during - * create() callback. - */ + * create() callback explicitly or implicity through the helpers s/implicity/implicitly/

Re: [PATCH V7 1/6] mdev: class id support

2019-11-04 Thread Jason Wang
On 2019/11/5 上午5:50, Alex Williamson wrote: On Mon, 4 Nov 2019 20:39:47 +0800 Jason Wang wrote: Mdev bus only supports vfio driver right now, so it doesn't implement match method. But in the future, we may add drivers other than vfio, the first driver could be virtio-mdev. This means we

[PATCH V7 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-04 Thread Jason Wang
'virtio' type is supported right now. I plan to add 'vhost' type on top which requires some virtual IOMMU implemented in this sample driver. Signed-off-by: Jason Wang --- MAINTAINERS| 1 + samples/Kconfig| 7 + samples/vfio-mdev/Makefile | 1 + samples/vfio-mdev

[PATCH V7 2/6] modpost: add support for mdev class id

2019-11-04 Thread Jason Wang
Add support to parse mdev class id table. Reviewed-by: Parav Pandit Signed-off-by: Jason Wang --- drivers/vfio/mdev/vfio_mdev.c | 2 ++ scripts/mod/devicetable-offsets.c | 3 +++ scripts/mod/file2alias.c | 11 +++ 3 files changed, 16 insertions(+) diff --git a/drivers

[PATCH V7 1/6] mdev: class id support

2019-11-04 Thread Jason Wang
. So this patch adds id_table to mdev_driver and class_id for mdev device with the match method for mdev bus. Reviewed-by: Parav Pandit Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst | 5 drivers/gpu/drm/i915/gvt/kvmgt.c | 1 + drivers/s390/cio

Re: [PATCH V6 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-10-30 Thread Jason Wang
On 2019/10/31 上午5:23, Christoph Hellwig wrote: On Wed, Oct 30, 2019 at 02:44:44PM +0800, Jason Wang wrote: This sample driver creates mdev device that simulate virtio net device over virtio mdev transport. The device is implemented through vringh and workqueue. A device specific dma ops

[PATCH V6 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-10-30 Thread Jason Wang
'virtio' type is supported right now. I plan to add 'vhost' type on top which requires some virtual IOMMU implemented in this sample driver. Signed-off-by: Jason Wang --- MAINTAINERS| 1 + samples/Kconfig| 7 + samples/vfio-mdev/Makefile | 1 + samples/vfio-mdev

[PATCH V6 5/6] virtio: introduce a mdev based transport

2019-10-30 Thread Jason Wang
the device with mdev based config ops. This means it is a software transport between mdev driver and mdev device. The transport was implemented through device specific ops which is a part of mdev_parent_ops now. Signed-off-by: Jason Wang --- drivers/virtio/Kconfig | 7 + drivers/virtio

[PATCH V6 4/6] mdev: introduce virtio device and its device ops

2019-10-30 Thread Jason Wang
This patch implements basic support for mdev driver that supports virtio transport for kernel virtio driver. Signed-off-by: Jason Wang --- drivers/vfio/mdev/mdev_core.c| 20 drivers/vfio/mdev/mdev_private.h | 2 + include/linux/mdev.h | 6 ++ include/linux

[PATCH V6 3/6] mdev: introduce device specific ops

2019-10-30 Thread Jason Wang
to be used by vfio-mdev and virtio-mdev. Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst | 35 + MAINTAINERS | 1 + drivers/gpu/drm/i915/gvt/kvmgt.c | 18 --- drivers/s390/cio/vfio_ccw_ops.c

[PATCH V6 2/6] modpost: add support for mdev class id

2019-10-30 Thread Jason Wang
Add support to parse mdev class id table. Reviewed-by: Parav Pandit Signed-off-by: Jason Wang --- drivers/vfio/mdev/vfio_mdev.c | 2 ++ scripts/mod/devicetable-offsets.c | 3 +++ scripts/mod/file2alias.c | 11 +++ 3 files changed, 16 insertions(+) diff --git a/drivers

[PATCH V6 1/6] mdev: class id support

2019-10-30 Thread Jason Wang
. So this patch adds id_table to mdev_driver and class_id for mdev device with the match method for mdev bus. Signed-off-by: Jason Wang --- .../driver-api/vfio-mediated-device.rst | 5 drivers/gpu/drm/i915/gvt/kvmgt.c | 1 + drivers/s390/cio/vfio_ccw_ops.c

[PATCH V6 0/6] mdev based hardware virtio offloading support

2019-10-30 Thread Jason Wang
nd device specific ops (device_ops) - split device_ops into seperate headers - drop the mdev_set_dma_ops() - use device_ops to implement the transport API, then it's not a part of UAPI any more - use GFP_ATOMIC in mvnet sample device and other tweaks - set_vring_base/get_vring_base support for mvnet dev

Re: [PATCH V5 4/6] mdev: introduce virtio device and its device ops

2019-10-29 Thread Jason Wang
On 2019/10/29 下午3:42, Zhu Lingshan wrote: >> >> +    void (*set_status)(struct mdev_device *mdev, u8 status); > > Hi Jason > > Is it possible to make set_status() return an u8 or bool, because this > may fail in real hardware. Without a returned code, I am not sure  > whether it is a good idea to

Re: [PATCH V5 4/6] mdev: introduce virtio device and its device ops

2019-10-24 Thread Jason Wang
On 2019/10/25 上午4:44, Alex Williamson wrote: On Thu, 24 Oct 2019 11:51:35 +0800 Jason Wang wrote: On 2019/10/24 上午5:57, Alex Williamson wrote: On Wed, 23 Oct 2019 21:07:50 +0800 Jason Wang wrote: This patch implements basic support for mdev driver that supports virtio transport

Re: [PATCH V5 2/6] modpost: add support for mdev class id

2019-10-24 Thread Jason Wang
On 2019/10/25 上午3:54, Alex Williamson wrote: On Thu, 24 Oct 2019 11:31:04 +0800 Jason Wang wrote: On 2019/10/24 上午5:42, Alex Williamson wrote: On Wed, 23 Oct 2019 21:07:48 +0800 Jason Wang wrote: Add support to parse mdev class id table. Reviewed-by: Parav Pandit Signed-off-by: Jason

Re: [PATCH V5 1/6] mdev: class id support

2019-10-24 Thread Jason Wang
On 2019/10/25 上午4:13, Alex Williamson wrote: On Thu, 24 Oct 2019 13:46:36 -0600 Alex Williamson wrote: On Thu, 24 Oct 2019 11:27:36 +0800 Jason Wang wrote: On 2019/10/24 上午5:42, Alex Williamson wrote: On Wed, 23 Oct 2019 21:07:47 +0800 Jason Wang wrote: Mdev bus only supports vfio

Re: [PATCH V5 4/6] mdev: introduce virtio device and its device ops

2019-10-23 Thread Jason Wang
On 2019/10/24 上午5:57, Alex Williamson wrote: On Wed, 23 Oct 2019 21:07:50 +0800 Jason Wang wrote: This patch implements basic support for mdev driver that supports virtio transport for kernel virtio driver. Signed-off-by: Jason Wang --- drivers/vfio/mdev/mdev_core.c| 20

Re: [PATCH V5 2/6] modpost: add support for mdev class id

2019-10-23 Thread Jason Wang
On 2019/10/24 上午5:42, Alex Williamson wrote: On Wed, 23 Oct 2019 21:07:48 +0800 Jason Wang wrote: Add support to parse mdev class id table. Reviewed-by: Parav Pandit Signed-off-by: Jason Wang --- drivers/vfio/mdev/vfio_mdev.c | 2 ++ scripts/mod/devicetable-offsets.c | 3

Re: [PATCH V5 1/6] mdev: class id support

2019-10-23 Thread Jason Wang
On 2019/10/24 上午5:42, Alex Williamson wrote: On Wed, 23 Oct 2019 21:07:47 +0800 Jason Wang wrote: Mdev bus only supports vfio driver right now, so it doesn't implement match method. But in the future, we may add drivers other than vfio, the first driver could be virtio-mdev. This means we

  1   2   3   >