Re: [PATCH vhost v3 00/19] virtio: drivers maintain dma info for premapped vq

2024-03-06 Thread Jason Wang
On Wed, Mar 6, 2024 at 6:01 PM Xuan Zhuo wrote: > > On Thu, 29 Feb 2024 04:34:20 -0500, "Michael S. Tsirkin" > wrote: > > On Thu, Feb 29, 2024 at 05:02:37PM +0800, Xuan Zhuo wrote: > > > On Thu, 29 Feb 2024 03:21:14 -0500, "Michael S. Tsirkin" > > > wrote: > > > > On Thu, Feb 29, 2024 at 03:20

Re: [PATCH v2 1/3] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-03-06 Thread Michael Ellerman
Hi Arnd, Arnd Bergmann writes: > From: Arnd Bergmann > > These four architectures define the same Kconfig symbols for configuring > the page size. Move the logic into a common place where it can be shared > with all other architectures. > > Signed-off-by: Arnd Bergmann > --- > Changes from v1:

Re: [v2 PATCH 0/3] arch: mm, vdso: consolidate PAGE_SIZE definition

2024-03-06 Thread Thomas Gleixner
On Wed, Mar 06 2024 at 15:14, Arnd Bergmann wrote: > From: Arnd Bergmann > > Naresh noticed that the newly added usage of the PAGE_SIZE macro in > include/vdso/datapage.h introduced a build regression. I had an older > patch that I revived to have this defined through Kconfig rather than > through

Re: [PATCH v2 3/3] arch: define CONFIG_PAGE_SIZE_*KB on all architectures

2024-03-06 Thread Thomas Gleixner
On Wed, Mar 06 2024 at 15:14, Arnd Bergmann wrote: > From: Arnd Bergmann > > Most architectures only support a single hardcoded page size. In order > to ensure that each one of these sets the corresponding Kconfig symbols, > change over the PAGE_SHIFT definition to the common one and allow > only

Re: [PATCH v2 2/3] arch: simplify architecture specific page size configuration

2024-03-06 Thread Thomas Gleixner
On Wed, Mar 06 2024 at 15:14, Arnd Bergmann wrote: > From: Arnd Bergmann > > arc, arm64, parisc and powerpc all have their own Kconfig symbols > in place of the common CONFIG_PAGE_SIZE_4KB symbols. Change these > so the common symbols are the ones that are actually used, while > leaving the arhcit

Re: [PATCH v2 1/3] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-03-06 Thread Thomas Gleixner
On Wed, Mar 06 2024 at 15:14, Arnd Bergmann wrote: > From: Arnd Bergmann > > These four architectures define the same Kconfig symbols for configuring > the page size. Move the logic into a common place where it can be shared > with all other architectures. > > Signed-off-by: Arnd Bergmann Review

Re: [PATCH v2 3/3] arch: define CONFIG_PAGE_SIZE_*KB on all architectures

2024-03-06 Thread Geert Uytterhoeven
On Wed, Mar 6, 2024 at 3:15 PM Arnd Bergmann wrote: > From: Arnd Bergmann > > Most architectures only support a single hardcoded page size. In order > to ensure that each one of these sets the corresponding Kconfig symbols, > change over the PAGE_SHIFT definition to the common one and allow > onl

Re: pcap-dbus.o:undefined reference to `dbus_message_demarshal'

2024-03-06 Thread Waqar Hameed
On Tue, Mar 05, 2024 at 23:11 +0800 kernel test robot wrote: > Hi Vincent, > > FYI, the error/warning still remains. > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: 90d35da658da8cff0d4ecbb5113f5fac9d00eb72 > commit: 10f4c9b9a33b7df000f74fa0d89635

[PATCH v2 3/3] arch: define CONFIG_PAGE_SIZE_*KB on all architectures

2024-03-06 Thread Arnd Bergmann
From: Arnd Bergmann Most architectures only support a single hardcoded page size. In order to ensure that each one of these sets the corresponding Kconfig symbols, change over the PAGE_SHIFT definition to the common one and allow only the hardware page size to be selected. Acked-by: Guo Ren Ack

[PATCH v2 2/3] arch: simplify architecture specific page size configuration

2024-03-06 Thread Arnd Bergmann
From: Arnd Bergmann arc, arm64, parisc and powerpc all have their own Kconfig symbols in place of the common CONFIG_PAGE_SIZE_4KB symbols. Change these so the common symbols are the ones that are actually used, while leaving the arhcitecture specific ones as the user visible place for configuring

[PATCH v2 1/3] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-03-06 Thread Arnd Bergmann
From: Arnd Bergmann These four architectures define the same Kconfig symbols for configuring the page size. Move the logic into a common place where it can be shared with all other architectures. Signed-off-by: Arnd Bergmann --- Changes from v1: - improve Kconfig help texts - fix Hexagon Kcon

[v2 PATCH 0/3] arch: mm, vdso: consolidate PAGE_SIZE definition

2024-03-06 Thread Arnd Bergmann
From: Arnd Bergmann Naresh noticed that the newly added usage of the PAGE_SIZE macro in include/vdso/datapage.h introduced a build regression. I had an older patch that I revived to have this defined through Kconfig rather than through including asm/page.h, which is not allowed in vdso code. The

[PATCH vhost v1 1/4] virtio: find_vqs: pass struct instead of multi parameters

2024-03-06 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 v1 3/4] virtio: vring_new_virtqueue(): pass struct instead of multi parameters

2024-03-06 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

[PATCH vhost v1 2/4] virtio: vring_create_virtqueue: pass struct instead of multi parameters

2024-03-06 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 v1 0/4] refactor the params of find_vqs()

2024-03-06 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 v1 4/4] virtio_ring: simplify the parameters of the funcs related to vring_create/new_virtqueue()

2024-03-06 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 --- drivers/virtio/virtio_ring.c | 157 +++--

[PATCH v3 8/9] um: Fix -Wmissing-prototypes warnings for text_poke*

2024-03-06 Thread Tiwei Bie
The prototypes for text_poke* are declared in asm/text-patching.h under arch/x86/include/. It's safe to include this header, as it's UML-aware (by checking CONFIG_UML_X86). This will address below -Wmissing-prototypes warnings: arch/um/kernel/um_arch.c:461:7: warning: no previous prototype for ‘t

[PATCH v3 6/9] um: Stop tracking host PID in cpu_tasks

2024-03-06 Thread Tiwei Bie
The host PID tracked in 'cpu_tasks' is no longer used. Stopping tracking it will also save some cycles. Signed-off-by: Tiwei Bie --- arch/um/include/shared/as-layout.h | 1 - arch/um/kernel/process.c | 12 ++-- arch/um/kernel/skas/process.c | 4 3 files changed, 2 i

[PATCH v3 9/9] um: Fix -Wmissing-prototypes warnings for __warp_* and foo

2024-03-06 Thread Tiwei Bie
These functions are not called explicitly. Let's just workaround the -Wmissing-prototypes warnings by declaring them locally similar to what was done in arch/x86/kernel/asm-offsets_32.c. This will address below -Wmissing-prototypes warnings: ./arch/x86/um/shared/sysdep/kernel-offsets.h:9:6: warni

[PATCH v3 2/9] um: Fix the declaration of vfree

2024-03-06 Thread Tiwei Bie
The definition of vfree has changed since commit b3bdda02aa54 ("vmalloc: add const to void* parameters"). Update the declaration of vfree in um_malloc.h to match the latest definition. Signed-off-by: Tiwei Bie --- arch/um/include/shared/um_malloc.h | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH v3 3/9] um: Remove unused functions

2024-03-06 Thread Tiwei Bie
These functions are not used anymore. Removing them will also address below -Wmissing-prototypes warnings: arch/um/kernel/process.c:51:5: warning: no previous prototype for ‘pid_to_processor_id’ [-Wmissing-prototypes] arch/um/kernel/process.c:253:5: warning: no previous prototype for ‘copy_to_us

[PATCH v3 4/9] um: Fix the return type of __switch_to

2024-03-06 Thread Tiwei Bie
Make it match the declaration in asm-generic/switch_to.h. And also include the header to allow the compiler to check it. Signed-off-by: Tiwei Bie --- arch/um/kernel/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c

[PATCH v3 1/9] um: Make local functions and variables static

2024-03-06 Thread Tiwei Bie
This will also fix the warnings like: warning: no previous prototype for ‘fork_handler’ [-Wmissing-prototypes] 140 | void fork_handler(void) | ^~~~ Signed-off-by: Tiwei Bie --- arch/um/drivers/pcap_kern.c | 4 ++-- arch/um/drivers/ubd_user.c | 2 +

[PATCH v3 7/9] um: Move declarations to proper headers

2024-03-06 Thread Tiwei Bie
This will address below -Wmissing-prototypes warnings: arch/um/kernel/initrd.c:18:12: warning: no previous prototype for ‘read_initrd’ [-Wmissing-prototypes] arch/um/kernel/um_arch.c:408:19: warning: no previous prototype for ‘read_initrd’ [-Wmissing-prototypes] arch/um/os-Linux/start_up.c:301:1

[PATCH v3 0/9] um: Minor fixes and cleanups

2024-03-06 Thread Tiwei Bie
A series of minor fixes and cleanups for UML. Most changes in this series are very straightforward. Please consider picking this series for v6.9. There are still some remaining -Wmissing-prototypes warnings. I plan to send a followup RFC series first to fix those warnings. Feedbacks on this seri

[PATCH v3 5/9] um: Add missing headers

2024-03-06 Thread Tiwei Bie
This will address below -Wmissing-prototypes warnings: arch/um/kernel/mem.c:202:8: warning: no previous prototype for ‘pgd_alloc’ [-Wmissing-prototypes] arch/um/kernel/mem.c:215:7: warning: no previous prototype for ‘uml_kmalloc’ [-Wmissing-prototypes] arch/um/kernel/process.c:207:6: warning: no

Re: [PATCH vhost v3 00/19] virtio: drivers maintain dma info for premapped vq

2024-03-06 Thread Xuan Zhuo
On Thu, 29 Feb 2024 04:34:20 -0500, "Michael S. Tsirkin" wrote: > On Thu, Feb 29, 2024 at 05:02:37PM +0800, Xuan Zhuo wrote: > > On Thu, 29 Feb 2024 03:21:14 -0500, "Michael S. Tsirkin" > > wrote: > > > On Thu, Feb 29, 2024 at 03:20:25PM +0800, Xuan Zhuo wrote: > > > > As discussed: > > > > htt

[PATCH] um: Fix return value in ubd_init()

2024-03-06 Thread Duoming Zhou
When kmalloc_array() fails to allocate memory, the ubd_init() should return -ENOMEM instead of -1. So, fix it. Fixes: f88f0bdfc32f ("um: UBD Improvements") Signed-off-by: Duoming Zhou --- arch/um/drivers/ubd_kern.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/d