Re: [PATCH RESEND 1/1] um: oops on accessing a non-present page in the vmalloc area

2024-03-21 Thread Petr Tesarik
On 3/21/2024 5:44 AM, David Gow wrote: > On Fri, 23 Feb 2024 at 22:07, Petr Tesarik > wrote: >> >> From: Petr Tesarik >> >> If a segmentation fault is caused by accessing an address in the vmalloc >> area, check that the target page is present. >> >> Currently, if the kernel hits a guard page in

[PATCH vhost v4 4/6] virtio: vring_create_virtqueue: pass struct instead of multi parameters

2024-03-21 Thread Xuan Zhuo
Now, we pass multi parameters to vring_create_virtqueue. These parameters may from transport or from driver. vring_create_virtqueue is called by many places. Every time, we try to add a new parameter, that is difficult. If parameters from the driver, that should directly be passed to vring. Then

[PATCH vhost v4 0/6] refactor the params of find_vqs()

2024-03-21 Thread Xuan Zhuo
This pathset is splited from the http://lore.kernel.org/all/20240229072044.77388-1-xuanz...@linux.alibaba.com That may needs some cycles to discuss. But that notifies too many people. But just the four commits need to notify so many people. And four commits are independent. So I split that

[PATCH vhost v4 2/6] virtio: remove support for names array entries being null.

2024-03-21 Thread Xuan Zhuo
commit 6457f126c888 ("virtio: support reserved vqs") introduced this support. Multiqueue virtio-net use 2N as ctrl vq finally, so the logic doesn't apply. And not one uses this. On the other side, that makes some trouble for us to refactor the find_vqs() params. So I remove this support. Signed-

[PATCH vhost v4 6/6] virtio_ring: simplify the parameters of the funcs related to vring_create/new_virtqueue()

2024-03-21 Thread Xuan Zhuo
As the refactor of find_vqs()/vring_new_virtqueue()/vring_create_virtqueue the struct cfg/tp_cfg are passed to vring. This patch refactors the vring by these structures. This can simplify the code. Signed-off-by: Xuan Zhuo Reviewed-by: Ilpo Järvinen --- drivers/virtio/virtio_ring.c | 157 +

[PATCH vhost v4 3/6] virtio: find_vqs: pass struct instead of multi parameters

2024-03-21 Thread Xuan Zhuo
Now, we pass multi parameters to find_vqs. These parameters may work for transport or work for vring. And find_vqs has multi implements in many places: arch/um/drivers/virtio_uml.c drivers/platform/mellanox/mlxbf-tmfifo.c drivers/remoteproc/remoteproc_virtio.c drivers/s390/virtio/virtio_ccw.c

[PATCH vhost v4 1/6] virtio_balloon: remove the dependence where names[] is null

2024-03-21 Thread Xuan Zhuo
Currently, the init_vqs function within the virtio_balloon driver relies on the condition that certain names array entries are null in order to skip the initialization of some virtual queues (vqs). This behavior is unique to this part of the codebase. In an upcoming commit, we plan to eliminate thi

[PATCH vhost v4 5/6] virtio: vring_new_virtqueue(): pass struct instead of multi parameters

2024-03-21 Thread Xuan Zhuo
Now, we pass multi parameters to vring_new_virtqueue. These parameters may from transport or from driver. vring_new_virtqueue is called by many places. Every time, we try to add a new parameter, that is difficult. If parameters from the driver, that should directly be passed to vring. Then the vr