Re: [PATCH v8 4/5] KVM: riscv: selftests: Fix compile error

2024-07-28 Thread Anup Patel
On Fri, Jul 26, 2024 at 2:19 PM Yong-Xuan Wang wrote: > > Fix compile error introduced by commit d27c34a73514 ("KVM: riscv: > selftests: Add some Zc* extensions to get-reg-list test"). These > 4 lines should be end with ";". > > Fixes: d27c34a73514 ("KVM: riscv: selftests: Add some Zc* extensions

[PATCH v2] kselftests: dmabuf-heaps: Ensure the driver name is null-terminated

2024-07-28 Thread Zenghui Yu
Even if a vgem device is configured in, we will skip the import_vgem_fd() test almost every time. TAP version 13 1..11 # Testing heap: system # === # Testing allocation and importing: ok 1 # SKIP Could not open vgem -1 The problem is that we use the

Re: [PATCH 1/1] lib/llist_kunit.c: add KUnit tests for llist

2024-07-28 Thread Artur Alves
Hi Jeff, I was unaware of this commit, I'm going to fix this issue to ensure no warnings are introduced. Now I'm also aware of two patches that reorganize KUnit tests ([1], [2]). I'll take these into account for the revised version. Thanks for your reply. Artur Alves [1] https://lore.kernel.

[PATCH] tools/nolibc: pass argc, argv and envp to constructors

2024-07-28 Thread Thomas Weißschuh
int run_startup(int min, int max) --- base-commit: 0db287736bc586fcd5a2925518ef09eec6924803 change-id: 20240728-nolibc-constructor-args-68bf56ff7438 Best regards, -- Thomas Weißschuh

Re: [PATCH 3/4] ALSA: timer: Introduce virtual userspace-driven timers

2024-07-28 Thread Ivan Orlov
On 7/28/24 11:29, Christophe JAILLET wrote: I may be wrong but I think that ida allocates hunks for 1024 bits (128 bytes * 8) at a time. (see [1]) So with this extra sape and the sapce for the xarray, it would waste a few bytes of memory, yes. With ida, there is also some locking that may

Re: [RFC PATCH v5 09/29] KVM: selftests: TDX: Add report_fatal_error test

2024-07-28 Thread Binbin Wu
On 4/23/2024 5:23 AM, Sean Christopherson wrote: On Thu, Apr 18, 2024, Yan Zhao wrote: On Tue, Apr 16, 2024 at 11:50:19AM -0700, Sean Christopherson wrote: On Mon, Apr 15, 2024, Yan Zhao wrote: On Mon, Apr 15, 2024 at 08:05:49AM +, Ackerley Tng wrote: The Intel GHCI Spec says in R12, b

Re: [PATCH 3/4] ALSA: timer: Introduce virtual userspace-driven timers

2024-07-28 Thread Christophe JAILLET
Le 28/07/2024 à 11:42, Ivan Orlov a écrit : On 7/28/24 10:30, Christophe JAILLET wrote: Le 28/07/2024 à 10:51, Ivan Orlov a écrit : On 7/28/24 07:59, Christophe JAILLET wrote: Le 26/07/2024 à 09:47, Ivan Orlov a écrit : Implement two ioctl calls in order to support virtual userspace-driven AL

[PATCH 07/12] selftests/nolibc: determine $(srctree) first

2024-07-28 Thread Thomas Weißschuh
Avoid needing relative includes. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 46dfbb50fae5.

[PATCH 09/12] selftests/nolibc: add support for LLVM= parameter

2024-07-28 Thread Thomas Weißschuh
Makefile.include can modify CC and CFLAGS for usage with clang. Make use of it. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile in

[PATCH 12/12] selftests/nolibc: run-tests.sh: allow building through LLVM

2024-07-28 Thread Thomas Weißschuh
The nolibc tests can now be properly built with LLVM. Expose this through run-tests.sh. Not all architectures are compatible, add a list for those. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/run-tests.sh | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-)

[PATCH 10/12] selftests/nolibc: add cc-option compatible with clang cross builds

2024-07-28 Thread Thomas Weißschuh
The cc-option macro from Build.include is not compatible with clang cross builds, as it does not respect the "--target" and similar flags, set up by Mekfile.include. Provide a custom variant which works correctly. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 6 +

[PATCH 05/12] selftests/nolibc: report failure if no testcase passed

2024-07-28 Thread Thomas Weißschuh
When nolibc-test is so broken, it doesn't even start, don't report success. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Ma

[PATCH 11/12] selftests/nolibc: run-tests.sh: avoid overwriting CFLAGS_EXTRA

2024-07-28 Thread Thomas Weißschuh
If the user specified their own CFLAGS_EXTRA these should not be overwritten by `-e`. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/run-tests.sh | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/nolibc/run-tests.sh b/tools/te

[PATCH 06/12] selftests/nolibc: avoid passing NULL to printf("%s")

2024-07-28 Thread Thomas Weißschuh
Clang on higher optimization levels detects that NULL is passed to printf("%s") and warns about it. Avoid the warning. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/nolibc-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/

[PATCH 08/12] selftests/nolibc: setup objtree without Makefile.include

2024-07-28 Thread Thomas Weißschuh
Makefile.include has multiple uses. In addition to the setup of various variables based on "O=", for which it is used currently, it can also set up variables based on "LLVM=". Unfortunately using it for both at the same time would require a big ugly reshuffling of the nolibc Makefile. As we want to

[PATCH 01/12] tools/nolibc: use clang-compatible asm syntax in arch-arm.h

2024-07-28 Thread Thomas Weißschuh
The clang assembler rejects the current syntax. Switch to a syntax accepted by both GCC and clang. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/arch-arm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/include/nolibc/arch-arm.h b/tools/include/nolibc/ar

[PATCH 00/12] tools/nolibc: improve LLVM/clang support

2024-07-28 Thread Thomas Weißschuh
The current support for LLVM and clang in nolibc and its testsuite is very limited. * Various architectures plain do not compile * The user *has* to specify "-Os" otherwise the program crashes * Cross-compilation of the tests does not work * Using clang is not wired up in run-tests.sh This series

[PATCH 04/12] tools/nolibc: use attribute((naked)) if available

2024-07-28 Thread Thomas Weißschuh
The current entrypoint attributes optimize("Os", "omit-frame-pointer") are intended to avoid all compiler generated code, like function porologue and epilogue. This is the exact usecase implemented by the attribute "naked". Unfortunately this is not implemented by GCC for all targets, so only use

[PATCH 03/12] tools/nolibc: move entrypoint specifics to compiler.h

2024-07-28 Thread Thomas Weißschuh
The specific attributes for the _start entrypoint are duplicated for each architecture. Deduplicate it into a dedicated #define into compiler.h. This make the code shorter and will make it easier to adapt for clang compatibility. For clang compatibility, the epilogue will also need to be adapted,

[PATCH 02/12] tools/nolibc: limit powerpc stack-protector workaround to GCC

2024-07-28 Thread Thomas Weißschuh
As mentioned in the comment, the workaround for __attribute__((no_stack_protector)) is only necessary on GCC. Avoid applying the workaround on clang, as clang does not recognize __attribute__((__optimize__)) and would fail. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/arch-powerpc.h

Re: [PATCH 3/4] ALSA: timer: Introduce virtual userspace-driven timers

2024-07-28 Thread Ivan Orlov
On 7/28/24 10:30, Christophe JAILLET wrote: Le 28/07/2024 à 10:51, Ivan Orlov a écrit : On 7/28/24 07:59, Christophe JAILLET wrote: Le 26/07/2024 à 09:47, Ivan Orlov a écrit : Implement two ioctl calls in order to support virtual userspace-driven ALSA timers. The first ioctl is SNDRV_TIMER_IO

Re: [PATCH 3/4] ALSA: timer: Introduce virtual userspace-driven timers

2024-07-28 Thread Christophe JAILLET
Le 28/07/2024 à 10:51, Ivan Orlov a écrit : On 7/28/24 07:59, Christophe JAILLET wrote: Le 26/07/2024 à 09:47, Ivan Orlov a écrit : Implement two ioctl calls in order to support virtual userspace-driven ALSA timers. The first ioctl is SNDRV_TIMER_IOCTL_CREATE, which gets the snd_utimer_info st

Re: [PATCH 3/4] ALSA: timer: Introduce virtual userspace-driven timers

2024-07-28 Thread Ivan Orlov
On 7/28/24 07:59, Christophe JAILLET wrote: Le 26/07/2024 à 09:47, Ivan Orlov a écrit : Implement two ioctl calls in order to support virtual userspace-driven ALSA timers. The first ioctl is SNDRV_TIMER_IOCTL_CREATE, which gets the snd_utimer_info struct as a parameter and returns a file descri

Re: [PATCH 3/4] ALSA: timer: Introduce virtual userspace-driven timers

2024-07-28 Thread Ivan Orlov
On 7/28/24 07:52, Christophe JAILLET wrote: Hi, Hi Christophe, ... diff --git a/sound/core/Kconfig b/sound/core/Kconfig index b970a1734647..3cf82641fc67 100644 --- a/sound/core/Kconfig +++ b/sound/core/Kconfig @@ -251,6 +251,17 @@ config SND_JACK_INJECTION_DEBUG     Say Y if you are de

Re: [PATCH 3/4] ALSA: timer: Introduce virtual userspace-driven timers

2024-07-28 Thread Christophe JAILLET
Le 26/07/2024 à 09:47, Ivan Orlov a écrit : Implement two ioctl calls in order to support virtual userspace-driven ALSA timers. The first ioctl is SNDRV_TIMER_IOCTL_CREATE, which gets the snd_utimer_info struct as a parameter and returns a file descriptor of a virtual timer. It also updates the