Re: [PATCH 0/5] KVM: x86: Fix breakage in KVM_SET_XSAVE's ABI

2023-10-04 Thread Sean Christopherson
On Wed, 27 Sep 2023 17:19:51 -0700, Sean Christopherson wrote: > Rework how KVM limits guest-unsupported xfeatures to effectively hide > only when saving state for userspace (KVM_GET_XSAVE), i.e. to let userspace > load all host-supported xfeatures (via KVM_SET_XSAVE) irrespective of > what feature

Re: [PATCH 2/2] selftests/mm: Add a new test for madv and hugetlb

2023-10-04 Thread Rik van Riel
On Wed, 2023-10-04 at 10:11 -0700, Breno Leitao wrote: > > +char *huge_ptr; > + > +/* Touch the memory while it is being madvised() */ > +void *touch(void *unused) > +{ > +   char *ptr = (char *)huge_ptr; > + > +   if (!ptr) { > +   fprintf(stderr, "Failed to allocate memory\n"

Re: [PATCH v2 2/2] Documentation: Add debugfs docs with run after boot

2023-10-04 Thread Rae Moar
On Thu, Sep 14, 2023 at 5:06 AM David Gow wrote: > > On Sat, 9 Sept 2023 at 05:32, Rae Moar wrote: > > > > Expand the documentation on the KUnit debugfs filesystem on the > > run_manual.rst page. > > > > Add section describing how to access results using debugfs. > > > > Add section describing ho

Re: [PATCH v2 1/2] kunit: add ability to run tests after boot using debugfs

2023-10-04 Thread Rae Moar
On Thu, Sep 14, 2023 at 5:06 AM David Gow wrote: > > On Sat, 9 Sept 2023 at 05:31, Rae Moar wrote: > > > > Add functionality to run built-in tests after boot by writing to a > > debugfs file. > > > > Add a new debugfs file labeled "run" for each test suite to use for > > this purpose. > > > > As

[PATCH] kunit: Reset suite counter right before running tests

2023-10-04 Thread Michal Wajdeczko
Today we reset the suite counter as part of the suite cleanup, called from the module exit callback, but it might not work that well as one can try to collect results without unloading a previous test (either unintentionally or due to dependencies). For easy reproduction try to load the kunit-test

Re: [PATCH bpf-next 0/3] selftest/bpf, riscv: Improved cross-building support

2023-10-04 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Wed, 4 Oct 2023 14:27:18 +0200 you wrote: > From: Björn Töpel > > Yet another "more cross-building support for RISC-V" series. > > An example how to invoke a gen_tar build: > > | make ARCH=riscv CROSS_COMPI

Re: [PATCH bpf 0/3] libbpf/selftests syscall wrapper fixes for RISC-V

2023-10-04 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Wed, 4 Oct 2023 13:09:02 +0200 you wrote: > From: Björn Töpel > > Commit 08d0ce30e0e4 ("riscv: Implement syscall wrappers") introduced > some regressions in libbpf, and the kselftests BPF suite, which are > fix

Re: [PATCH-cgroup v2] cgroup/cpuset: Enable invalid to valid local partition transition

2023-10-04 Thread Tejun Heo
On Tue, Oct 03, 2023 at 10:44:20AM -0400, Waiman Long wrote: > When a local partition becomes invalid, it won't transition back to > valid partition automatically if a proper "cpuset.cpus.exclusive" or > "cpuset.cpus" change is made. Instead, system administrators have to > explicitly echo "root" o

Re: [GIT PULL] Kselftest fixes update for Linux 6.6-rc5

2023-10-04 Thread pr-tracker-bot
The pull request you sent on Wed, 4 Oct 2023 09:46:00 -0600: > git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest > tags/linux-kselftest-fixes-6.6-rc5 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/ba7d997a2a29ee3fa766fee912c65796e0c21903 Thank you!

Re: [PATCH v2 1/6] selftests/resctrl: Extend signal handler coverage to unmount on receiving signal

2023-10-04 Thread Reinette Chatre
Hi Shaopeng, On 9/28/2023 1:10 AM, Shaopeng Tan (Fujitsu) wrote: >> On 9/15/2023 8:44 AM, Ilpo Järvinen wrote: ... >>> +static void run_mbm_test(const char * const *benchmark_cmd, int >>> +cpu_no) { >>> + int res; >>> + >>> + ksft_print_msg("Starting MBM BW change ...\n"); >>> + >>> + if (

[PATCH 2/2] selftests/mm: Add a new test for madv and hugetlb

2023-10-04 Thread Breno Leitao
Create a selftest that exercises the conflict between page faults and madvise(MADV_DONTNEED) in the same huge page. Do it by running two threads that touches the huge page and madvise(MADV_DONTNEED) at the same time. In case of a SIGBUS coming at pagefault, the test should fail, since we hit the b

[PATCH 1/2] selftests/mm: export get_free_hugepages()

2023-10-04 Thread Breno Leitao
get_free_hugepages() is helpful for other hugepage tests. Export it to the common file (vm_util.c) to be reused. Signed-off-by: Breno Leitao --- tools/testing/selftests/mm/hugetlb-madvise.c | 19 --- tools/testing/selftests/mm/vm_util.c | 19 +++ tools/tes

Re: [PATCH 0/5] KVM: x86: Fix breakage in KVM_SET_XSAVE's ABI

2023-10-04 Thread Sean Christopherson
On Wed, Oct 04, 2023, Tyler Stachecki wrote: > On Wed, Oct 04, 2023 at 07:51:17AM -0700, Sean Christopherson wrote: > > It's not about removing features. The change you're asking for is to have > > KVM > > *silently* drop data. Aside from the fact that such a change would break > > KVM's > >

Re: [PATCH bpf 0/3] libbpf/selftests syscall wrapper fixes for RISC-V

2023-10-04 Thread Sami Tolvanen
Hi Björn, On Wed, Oct 4, 2023 at 4:09 AM Björn Töpel wrote: > > From: Björn Töpel > > Commit 08d0ce30e0e4 ("riscv: Implement syscall wrappers") introduced > some regressions in libbpf, and the kselftests BPF suite, which are > fixed with these three patches. This series looks good to me. Thanks

Re: [PATCH v1 05/20] arm64: context switch POR_EL0 register

2023-10-04 Thread Catalin Marinas
On Wed, Sep 27, 2023 at 03:01:08PM +0100, Joey Gouly wrote: > +static void permission_overlay_switch(struct task_struct *next) > +{ > + if (alternative_has_cap_unlikely(ARM64_HAS_S1POE)) { > + current->thread.por_el0 = read_sysreg_s(SYS_POR_EL0); > + write_sysreg_s(next-

Re: [PATCH 2/2] selftests/user_events: Fix abi_test for BE archs

2023-10-04 Thread Shuah Khan
On 10/4/23 09:14, Steven Rostedt wrote: On Wed, 4 Oct 2023 09:10:52 -0600 Shuah Khan wrote: On 10/3/23 18:59, Steven Rostedt wrote: Note, this doesn't seem to apply to my tree so I only added the first patch. I think this needs to go through Shuah's tree. -- Steve Yes. I sent a fix u

[GIT PULL] Kselftest fixes update for Linux 6.6-rc5

2023-10-04 Thread Shuah Khan
Hi Linus, Please pull the following Kselftest fixes update for Linux 6.6-rc5. This kselftest fixes update for Linux 6.6-rc5 consists of one single fix to Makefile to fix the incorrect TARGET name for uevent test. diff is attached. thanks. -- Shuah -

Re: [PATCH 0/5] KVM: x86: Fix breakage in KVM_SET_XSAVE's ABI

2023-10-04 Thread Tyler Stachecki
On Wed, Oct 04, 2023 at 07:51:17AM -0700, Sean Christopherson wrote: > KVM's ABI has no formal notion of guest boot=>shutdown or live migration. The > myriad KVM_GET_* APIs allow taking a snapshot of guest state, and the > KVM_SET_* > APIs allow loading a snapshot of guest state. Live migration

Re: [PATCH 2/2] selftests/user_events: Fix abi_test for BE archs

2023-10-04 Thread Steven Rostedt
On Wed, 4 Oct 2023 09:10:52 -0600 Shuah Khan wrote: > On 10/3/23 18:59, Steven Rostedt wrote: > > > > Note, this doesn't seem to apply to my tree so I only added the first > > patch. I think this needs to go through Shuah's tree. > > > > -- Steve > > > > > > Yes. I sent a fix up for rc4 -

Re: [PATCH 2/2] selftests/user_events: Fix abi_test for BE archs

2023-10-04 Thread Shuah Khan
On 10/3/23 18:59, Steven Rostedt wrote: Note, this doesn't seem to apply to my tree so I only added the first patch. I think this needs to go through Shuah's tree. -- Steve Yes. I sent a fix up for rc4 - I can pull these two patches into linux-kselftest next Steve! Does that work for you?

Re: [PATCH 0/5] KVM: x86: Fix breakage in KVM_SET_XSAVE's ABI

2023-10-04 Thread Sean Christopherson
On Wed, Oct 04, 2023, Tyler Stachecki wrote: > On Wed, Oct 04, 2023 at 04:11:52AM -0300, Leonardo Bras wrote: > > So this patch is supposed to fix migration of VM from a host with > > pre-ad856280ddea (OLD) kernel to a host with ad856280ddea + your set(NEW). > > Right? > > > > Let's get the scenar

Re: [PATCH v3 2/6] RISC-V: Detect Zicond from ISA string

2023-10-04 Thread Palmer Dabbelt
On Mon, 02 Oct 2023 20:52:22 PDT (-0700), apa...@ventanamicro.com wrote: The RISC-V integer conditional (Zicond) operation extension defines standard conditional arithmetic and conditional-select/move operations which are inspired from the XVentanaCondOps extension. In fact, QEMU RISC-V also has

[PATCH 3/3] selftests/dmabuf-heaps: add gitignore file

2023-10-04 Thread Javier Carrasco
dmabuf-heaps builds a dmabuf-heap binary that can be ignored by git. Signed-off-by: Javier Carrasco --- tools/testing/selftests/dmabuf-heaps/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/dmabuf-heaps/.gitignore b/tools/testing/selftests/dmabuf-heaps/.git

[PATCH 2/3] selftests/tdx: add gitignore file

2023-10-04 Thread Javier Carrasco
tdx builds a tdx_guest_test binary that can be ignored by git. Signed-off-by: Javier Carrasco --- tools/testing/selftests/tdx/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/tdx/.gitignore b/tools/testing/selftests/tdx/.gitignore new file mode 100644 index

[PATCH 1/3] selftests/user_events: add gitignore file

2023-10-04 Thread Javier Carrasco
user_events builds a series of binaries that can be ignored by git. Signed-off-by: Javier Carrasco --- tools/testing/selftests/user_events/.gitignore | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/user_events/.gitignore b/tools/testing/selftests/user_events/.git

[PATCH 0/3] selftests: add gitignore files to user_events, tdx and dmabuf-heaps

2023-10-04 Thread Javier Carrasco
: 20231004-topic-selftest_gitignore-3e82f4341001 Best regards, -- Javier Carrasco

Re: [PATCH bpf-next 3/3] selftests/bpf: Add uprobe_multi to gen_tar target

2023-10-04 Thread Jiri Olsa
On Wed, Oct 04, 2023 at 02:27:21PM +0200, Björn Töpel wrote: > From: Björn Töpel > > The uprobe_multi program was not picked up for the gen_tar target. Fix > by adding it to TEST_GEN_FILES. > > Signed-off-by: Björn Töpel Acked-by: Jiri Olsa thanks, jirka > --- > tools/testing/selftests/bp

[PATCH 2/2] kbuild: Merge per-arch config for kselftest-merge target

2023-10-04 Thread Björn Töpel
From: Björn Töpel Some kselftests has a per-arch config, e.g. tools/testing/selftests/bpf/config.s390x. Make sure these configs are picked up by the kselftest-merge target. Signed-off-by: Björn Töpel --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/M

[PATCH 1/2] kbuild: Let builtin have precedence over modules for kselftest-merge

2023-10-04 Thread Björn Töpel
From: Björn Töpel The kselftest-merge target walks all kselftests configs, and merges them. However, builtin does not have precedence over modules. This breaks some of the tests, e.g.: $ grep CONFIG_NF_NAT tools/testing/selftests/{bpf,net}/config tools/testing/selftests/bpf/config:CONFIG_NF_NAT=

[PATCH 0/2] kbuild: kselftest-merge target improvements

2023-10-04 Thread Björn Töpel
From: Björn Töpel Two minor changes to the kselftest-merge target: 1. Let builtin have presedence over modules when merging configs 2. Merge per-arch configs, if available Björn Björn Töpel (2): kbuild: Let builtin have precedence over modules for kselftest-merge kbuild: Merge per-arch co

[PATCH bpf-next 1/3] selftests/bpf: Add cross-build support for urandom_read et al

2023-10-04 Thread Björn Töpel
From: Björn Töpel Some userland programs in the BPF test suite, e.g. urandom_read, is missing cross-build support. Add cross-build support for these programs Signed-off-by: Björn Töpel --- tools/testing/selftests/bpf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[PATCH bpf-next 3/3] selftests/bpf: Add uprobe_multi to gen_tar target

2023-10-04 Thread Björn Töpel
From: Björn Töpel The uprobe_multi program was not picked up for the gen_tar target. Fix by adding it to TEST_GEN_FILES. Signed-off-by: Björn Töpel --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile

[PATCH bpf-next 2/3] selftests/bpf: Enable lld usage for RISC-V

2023-10-04 Thread Björn Töpel
From: Björn Töpel RISC-V has proper lld support. Use that, similar to what x86 does, for urandom_read et al. Signed-off-by: Björn Töpel --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/tes

[PATCH bpf-next 0/3] selftest/bpf, riscv: Improved cross-building support

2023-10-04 Thread Björn Töpel
From: Björn Töpel Yet another "more cross-building support for RISC-V" series. An example how to invoke a gen_tar build: | make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- CC=riscv64-linux-gnu-gcc \ |HOSTCC=gcc O=/workspace/kbuild FORMAT= \ |SKIP_TARGETS="arm64 ia64 powerpc sparc6

Re: [PATCH 0/5] KVM: x86: Fix breakage in KVM_SET_XSAVE's ABI

2023-10-04 Thread Tyler Stachecki
On Wed, Oct 04, 2023 at 04:11:52AM -0300, Leonardo Bras wrote: > So this patch is supposed to fix migration of VM from a host with > pre-ad856280ddea (OLD) kernel to a host with ad856280ddea + your set(NEW). > Right? > > Let's get the scenario here, where all machines are the same: > 1 - VM create

[PATCH bpf 2/3] selftests/bpf: Define SYS_PREFIX for riscv

2023-10-04 Thread Björn Töpel
From: Björn Töpel SYS_PREFIX was missing for a RISC-V, which made a couple of kprobe tests fail. Add missing SYS_PREFIX for RISC-V. Fixes: 08d0ce30e0e4 ("riscv: Implement syscall wrappers") Signed-off-by: Björn Töpel --- tools/testing/selftests/bpf/progs/bpf_misc.h | 3 +++ 1 file changed, 3

[PATCH bpf 3/3] selftests/bpf: Define SYS_NANOSLEEP_KPROBE_NAME for riscv

2023-10-04 Thread Björn Töpel
From: Björn Töpel Add missing sys_nanosleep name for RISC-V, which is used by some tests (e.g. attach_probe). Fixes: 08d0ce30e0e4 ("riscv: Implement syscall wrappers") Signed-off-by: Björn Töpel --- tools/testing/selftests/bpf/test_progs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/

[PATCH bpf 1/3] libbpf: Fix syscall access arguments on riscv

2023-10-04 Thread Björn Töpel
From: Alexandre Ghiti Since commit 08d0ce30e0e4 ("riscv: Implement syscall wrappers"), riscv selects ARCH_HAS_SYSCALL_WRAPPER so let's use the generic implementation of PT_REGS_SYSCALL_REGS(). Fixes: 08d0ce30e0e4 ("riscv: Implement syscall wrappers") Signed-off-by: Alexandre Ghiti --- tools/li

[PATCH bpf 0/3] libbpf/selftests syscall wrapper fixes for RISC-V

2023-10-04 Thread Björn Töpel
From: Björn Töpel Commit 08d0ce30e0e4 ("riscv: Implement syscall wrappers") introduced some regressions in libbpf, and the kselftests BPF suite, which are fixed with these three patches. Note that there's an outstanding fix [1] for ftrace syscall tracing which is also a fallout from the commit a

Re: [PATCH 0/5] KVM: x86: Fix breakage in KVM_SET_XSAVE's ABI

2023-10-04 Thread Leonardo Bras
On Wed, Sep 27, 2023 at 05:19:51PM -0700, Sean Christopherson wrote: > Rework how KVM limits guest-unsupported xfeatures to effectively hide > only when saving state for userspace (KVM_GET_XSAVE), i.e. to let userspace > load all host-supported xfeatures (via KVM_SET_XSAVE) irrespective of > what f