Re: [PATCH V4 0/5] virtio: Add virtio-device bindings

2021-08-03 Thread Viresh Kumar
On 27-07-21, 10:53, Viresh Kumar wrote: > Hi, > > Currently the DT only provides support for following node types for > virtio-mmio > nodes: > > virtio_mmio@a00 { > dma-coherent; > interrupts = <0x00 0x10 0x01>; > reg = <0x00 0xa00

Re: [PATCH V4 3/5] dt-bindings: gpio: Add bindings for gpio-virtio

2021-08-03 Thread Viresh Kumar
On 03-08-21, 09:47, Rob Herring wrote: > n Mon, Aug 2, 2021 at 10:30 PM Viresh Kumar wrote: > > > > On 02-08-21, 13:40, Rob Herring wrote: > > > Humm, how does one implement interrupts without a parent interrupt? It > > > uses the parent virtio,mmio interrupt? > > > > Kind of, yeah, but not

Re: [PATCH 00/11] Provide offset-adjusted framebuffer mappings

2021-08-03 Thread Sam Ravnborg
Hi Thomas, On Tue, Aug 03, 2021 at 02:59:17PM +0200, Thomas Zimmermann wrote: > A framebuffer's offsets field might be non-zero to make the BO data > start at the specified offset within the BO's memory. Handle this > case in drm_gem_fb_vmap() and update all callers. So far, many drivers > ignore

Re: [PATCH 01/11] drm/gem: Provide offset-adjusted framebuffer BO mappings

2021-08-03 Thread Sam Ravnborg
Hi Thomas, On Tue, Aug 03, 2021 at 02:59:18PM +0200, Thomas Zimmermann wrote: > Add an additional argument to drm_gem_fb_vmap() to return each BO's > mapping adjusted by the rsp offset. Update all callers. rsp? respective? > > The newly returned values point to the first by of the data stored

Re: [PATCH 00/38] Replace deprecated CPU-hotplug

2021-08-03 Thread Sebastian Andrzej Siewior
On 2021-08-03 17:30:40 [+0200], Hans de Goede wrote: > Hi Sebastien, Hi Hans, > On 8/3/21 4:15 PM, Sebastian Andrzej Siewior wrote: > > This is a tree wide replacement of the deprecated CPU hotplug functions > > which are only wrappers around the actual functions. > > > > Each patch is

Re: [PATCH V4 3/5] dt-bindings: gpio: Add bindings for gpio-virtio

2021-08-03 Thread Rob Herring
n Mon, Aug 2, 2021 at 10:30 PM Viresh Kumar wrote: > > On 02-08-21, 13:40, Rob Herring wrote: > > Humm, how does one implement interrupts without a parent interrupt? It > > uses the parent virtio,mmio interrupt? > > Kind of, yeah, but not necessarily. > > The interrupt information is passed over

Re: [PATCH 00/38] Replace deprecated CPU-hotplug

2021-08-03 Thread Hans de Goede
Hi Sebastien, On 8/3/21 4:15 PM, Sebastian Andrzej Siewior wrote: > This is a tree wide replacement of the deprecated CPU hotplug functions > which are only wrappers around the actual functions. > > Each patch is independent and can be picked up by the relevant maintainer. Ok; and I take it

[PATCH 12/38] crypto: virtio: Replace deprecated CPU-hotplug functions.

2021-08-03 Thread Sebastian Andrzej Siewior
The functions get_online_cpus() and put_online_cpus() have been deprecated during the CPU hotplug rework. They map directly to cpus_read_lock() and cpus_read_unlock(). Replace deprecated CPU-hotplug functions with the official version. The behavior remains unchanged. Cc: Gonglei Cc: "Michael S.

[PATCH 21/38] virtio_net: Replace deprecated CPU-hotplug functions.

2021-08-03 Thread Sebastian Andrzej Siewior
The functions get_online_cpus() and put_online_cpus() have been deprecated during the CPU hotplug rework. They map directly to cpus_read_lock() and cpus_read_unlock(). Replace deprecated CPU-hotplug functions with the official version. The behavior remains unchanged. Cc: "Michael S. Tsirkin"

[PATCH 00/38] Replace deprecated CPU-hotplug

2021-08-03 Thread Sebastian Andrzej Siewior
This is a tree wide replacement of the deprecated CPU hotplug functions which are only wrappers around the actual functions. Each patch is independent and can be picked up by the relevant maintainer. Cc: Alexander Shishkin Cc: Amit Kucheria Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo

[PATCH 07/11] drm/gm12u320: Use offset-adjusted shadow-plane mappings

2021-08-03 Thread Thomas Zimmermann
For framebuffers with non-zero offset fields, shadow-plane helpers provide a pointer to the first byte of the contained data. Use it in gm12u320. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/gm12u320.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 11/11] drm/vkms: Use offset-adjusted shadow-plane mappings and output

2021-08-03 Thread Thomas Zimmermann
For framebuffers with non-zero offset fields, shadow-plane helpers provide a pointer to the first byte of the contained data. Use it in vkms. Also provide use the offset-adjusted data address for the writeback job's output buffers. Output framebuffers with non-zero offsets now have their content

[PATCH 06/11] drm/cirrus: Use offset-adjusted shadow-plane mappings

2021-08-03 Thread Thomas Zimmermann
For framebuffers with non-zero offset fields, shadow-plane helpers provide a pointer to the first byte of the contained data. Use it in cirrus. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/cirrus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 00/11] Provide offset-adjusted framebuffer mappings

2021-08-03 Thread Thomas Zimmermann
A framebuffer's offsets field might be non-zero to make the BO data start at the specified offset within the BO's memory. Handle this case in drm_gem_fb_vmap() and update all callers. So far, many drivers ignore the offsets, which can lead to visual artifacts. Patch 1 adds an optional argument to

[PATCH 03/11] drm/gud: Get offset-adjusted mapping from drm_gem_fb_vmap()

2021-08-03 Thread Thomas Zimmermann
Pass the data parameter to drm_gem_fb_vmap() to retrieve pointers to the data. This address is different from the mapping addresses for framebuffers with non-zero offsets. Replaces gud's internal computation. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/gud/gud_pipe.c | 5 +++-- 1 file

[PATCH 10/11] drm/vbox: Use offset-adjusted shadow-plane mappings

2021-08-03 Thread Thomas Zimmermann
For framebuffers with non-zero offset fields, shadow-plane helpers provide a pointer to the first byte of the contained data. Use it in vbox. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vboxvideo/vbox_mode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 09/11] drm/udl: Use offset-adjusted shadow-plane mapping

2021-08-03 Thread Thomas Zimmermann
For framebuffers with non-zero offset fields, shadow-plane helpers provide a pointer to the first byte of the contained data. Use it in udl. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/udl/udl_modeset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 04/11] drm/hyperv: Use offset-adjusted shadow-plane mappings

2021-08-03 Thread Thomas Zimmermann
For framebuffers with non-zero offset fields, shadow-plane helpers provide a pointer to the first byte of the contained data. Use it in hyperv. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 02/11] drm/ast: Use offset-adjusted shadow-plane mappings

2021-08-03 Thread Thomas Zimmermann
For framebuffers with non-zero offset fields, shadow-plane helpers provide a pointer to the first byte of the contained data. Use it in ast. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_mode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 08/11] drm/simpledrm: Use offset-adjusted shadow-plane mapping

2021-08-03 Thread Thomas Zimmermann
For framebuffers with non-zero offset fields, shadow-plane helpers provide a pointer to the first byte of the contained data. Use it in simpledrm. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/simpledrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 01/11] drm/gem: Provide offset-adjusted framebuffer BO mappings

2021-08-03 Thread Thomas Zimmermann
Add an additional argument to drm_gem_fb_vmap() to return each BO's mapping adjusted by the rsp offset. Update all callers. The newly returned values point to the first by of the data stored in the framebuffer BOs. Drivers that access the BO data should use it. Signed-off-by: Thomas Zimmermann

[PATCH 05/11] drm/mgag200: Use offset-adjusted shadow-plane mappings

2021-08-03 Thread Thomas Zimmermann
For framebuffers with non-zero offset fields, shadow-plane helpers provide a pointer to the first byte of the contained data. Use it in mgag200. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_mode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH V4 2/2] gpio: virtio: Add IRQ support

2021-08-03 Thread Viresh Kumar
This patch adds IRQ support for the virtio GPIO driver. Note that this uses the irq_bus_lock/unlock() callbacks, since those operations over virtio may sleep. Also the notifications for the eventq are processed using a work item to allow sleep-able operations. Signed-off-by: Viresh Kumar ---

[PATCH V4 1/2] gpio: Add virtio-gpio driver

2021-08-03 Thread Viresh Kumar
This patch adds a new driver for Virtio based GPIO devices. This allows a guest VM running Linux to access GPIO lines provided by the host. It supports all basic operations, except interrupts for the GPIO lines. Based on the initial work posted by: "Enrico Weigelt, metux IT consult" .

[PATCH V4 0/2] gpio: Add virtio based driver

2021-08-03 Thread Viresh Kumar
Hello, This adds Virtio GPIO driver based on the proposed specification [1]. The specification for basic GPIO operations is already reviewed by Linus and Arnd, while the IRQ stuff is still under discussion and not finalized. I am sharing the code, so everyone gets more clarity on how it will

Re: [PATCH v10 01/17] iova: Export alloc_iova_fast() and free_iova_fast()

2021-08-03 Thread Robin Murphy
On 2021-08-03 09:54, Yongji Xie wrote: On Tue, Aug 3, 2021 at 3:41 PM Jason Wang wrote: 在 2021/7/29 下午3:34, Xie Yongji 写道: Export alloc_iova_fast() and free_iova_fast() so that some modules can use it to improve iova allocation efficiency. It's better to explain why alloc_iova() is not

Re: [PATCH v10 05/17] vhost-vdpa: Fail the vhost_vdpa_set_status() on reset failure

2021-08-03 Thread Jason Wang
在 2021/7/29 下午3:34, Xie Yongji 写道: Re-read the device status to ensure it's set to zero during resetting. Otherwise, fail the vhost_vdpa_set_status() after timeout. Signed-off-by: Xie Yongji --- drivers/vhost/vdpa.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff

Re: [PATCH v10 10/17] virtio: Handle device reset failure in register_virtio_device()

2021-08-03 Thread Jason Wang
在 2021/7/29 下午3:34, Xie Yongji 写道: The device reset may fail in virtio-vdpa case now, so add checks to its return value and fail the register_virtio_device(). So the reset() would be called by the driver during remove as well, or is it sufficient to deal only with the reset during probe?

Re: [PATCH v10 07/17] virtio: Don't set FAILED status bit on device index allocation failure

2021-08-03 Thread Jason Wang
在 2021/7/29 下午3:34, Xie Yongji 写道: We don't need to set FAILED status bit on device index allocation failure since the device initialization hasn't been started yet. This doesn't affect runtime, found in code review. Signed-off-by: Xie Yongji Does it really harm? Thanks ---

Re: [PATCH v10 04/17] vdpa: Fail the vdpa_reset() if fail to set device status to zero

2021-08-03 Thread Jason Wang
在 2021/7/29 下午3:34, Xie Yongji 写道: Re-read the device status to ensure it's set to zero during resetting. Otherwise, fail the vdpa_reset() after timeout. Signed-off-by: Xie Yongji --- include/linux/vdpa.h | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v10 03/17] vdpa: Fix code indentation

2021-08-03 Thread Jason Wang
在 2021/7/29 下午3:34, Xie Yongji 写道: Use tabs to indent the code instead of spaces. Signed-off-by: Xie Yongji --- include/linux/vdpa.h | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) It looks to me not all the warnings are addressed. Or did you

Re: [PATCH v10 02/17] file: Export receive_fd() to modules

2021-08-03 Thread Jason Wang
在 2021/7/29 下午3:34, Xie Yongji 写道: Export receive_fd() so that some modules can use it to pass file descriptor between processes without missing any security stuffs. Signed-off-by: Xie Yongji --- fs/file.c| 6 ++ include/linux/file.h | 7 +++ 2 files changed, 9

Re: [PATCH v10 01/17] iova: Export alloc_iova_fast() and free_iova_fast()

2021-08-03 Thread Jason Wang
在 2021/7/29 下午3:34, Xie Yongji 写道: Export alloc_iova_fast() and free_iova_fast() so that some modules can use it to improve iova allocation efficiency. It's better to explain why alloc_iova() is not sufficient here. Thanks Signed-off-by: Xie Yongji --- drivers/iommu/iova.c | 2 ++ 1

Re: [PATCH v10 01/17] iova: Export alloc_iova_fast() and free_iova_fast()

2021-08-03 Thread Jason Wang
在 2021/7/29 下午3:34, Xie Yongji 写道: Export alloc_iova_fast() and free_iova_fast() so that some modules can use it to improve iova allocation efficiency. It's better to explain which alloc_iova() is not sufficient here. Thanks Signed-off-by: Xie Yongji --- drivers/iommu/iova.c | 2 ++

Re: [PATCH v10 17/17] Documentation: Add documentation for VDUSE

2021-08-03 Thread Jason Wang
在 2021/7/29 下午3:35, Xie Yongji 写道: VDUSE (vDPA Device in Userspace) is a framework to support implementing software-emulated vDPA devices in userspace. This document is intended to clarify the VDUSE design and usage. Signed-off-by: Xie Yongji --- Documentation/userspace-api/index.rst | 1

Re: [PATCH v10 16/17] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-08-03 Thread Jason Wang
在 2021/7/29 下午3:35, Xie Yongji 写道: This VDUSE driver enables implementing software-emulated vDPA devices in userspace. The vDPA device is created by ioctl(VDUSE_CREATE_DEV) on /dev/vduse/control. Then a char device interface (/dev/vduse/$NAME) is exported to userspace for device emulation. In

Re: [PATCH net-next] virtio-net: realign page_to_skb() after merges

2021-08-03 Thread Michael S. Tsirkin
On Mon, Aug 02, 2021 at 10:57:29AM -0700, Jakub Kicinski wrote: > We ended up merging two versions of the same patch set: > > commit 8fb7da9e9907 ("virtio_net: get build_skb() buf by data ptr") > commit 5c37711d9f27 ("virtio-net: fix for unable to handle page fault for > address") > > into net,