Re: [PATCH v2 0/6] selftests: kvm: s390: Reject invalid ioctls on ucontrol VMs

2024-12-16 Thread Claudio Imbrenda
C_APF_ENABLE, > KVM_DEV_FLIC_APF_DISABLE_WAIT and KVM_SET_GSI_ROUTING ioctl. > > All of these issues do only exist on ucontrol VMs. Fixes for the issues > are included within the patch series. Whole series: Reviewed-by: Claudio Imbrenda > > v2: > - added documentation c

Re: [PATCH v1 2/6] selftests: kvm: s390: Add ucontrol flic attr selftests

2024-12-09 Thread Claudio Imbrenda
On Mon, 9 Dec 2024 12:07:13 +0100 Christoph Schlameuss wrote: > Add some superficial selftests for the floating interrupt controller > when using ucontrol VMs. These tests are intended to cover very basic > calls only. > > Some of the calls may trigger null pointer dereferences on kernels not >

Re: [PATCH v3 1/3] selftests: kvm: s390: Add uc_map_unmap VM test case

2024-09-13 Thread Claudio Imbrenda
On Fri, 13 Sep 2024 13:52:46 +0200 Christoph Schlameuss wrote: > Add a test case verifying basic running and interaction of ucontrol VMs. > Fill the segment and page tables for allocated memory and map memory on > first access. > > * uc_map_unmap > Store and load data to mapped and unmapped me

Re: [PATCH v2 2/3] selftests: kvm: s390: Add uc_skey VM test case

2024-09-12 Thread Claudio Imbrenda
On Mon, 2 Sep 2024 13:50:01 +0200 Christoph Schlameuss wrote: > Add a test case manipulating s390 storage keys from within the ucontrol > VM. > > Signed-off-by: Christoph Schlameuss > --- > .../selftests/kvm/s390x/ucontrol_test.c | 89 ++- > 1 file changed, 88 insertions

Re: [PATCH v2 1/3] selftests: kvm: s390: Add uc_map_unmap VM test case

2024-09-12 Thread Claudio Imbrenda
On Mon, 2 Sep 2024 13:50:00 +0200 Christoph Schlameuss wrote: > Add a test case verifying basic running and interaction of ucontrol VMs. > Fill the segment and page tables for allocated memory and map memory on > first access. > > * uc_map_unmap > Store and load data to mapped and unmapped me

Re: [PATCH v2 5/5] KVM: s390: selftests: Add regression tests for PLO subfunctions

2024-08-21 Thread Claudio Imbrenda
On Tue, 20 Aug 2024 08:48:37 +0200 Hariharan Mari wrote: > Extend the existing regression test framework for s390x CPU subfunctions > to include tests for the Perform Locked Operation (PLO) subfunction > functions. > > PLO was introduced in the very first 64-bit machine generation. > Hence it is

Re: [PATCH v2 1/5] KVM: s390: selftests: Add regression tests for SORTL and DFLTCC CPU subfunctions

2024-08-21 Thread Claudio Imbrenda
On Tue, 20 Aug 2024 08:48:33 +0200 Hariharan Mari wrote: > Introduce new regression tests to verify the ASM inline block in the SORTL > and DFLTCC CPU subfunctions for the s390x architecture. These tests ensure > that future changes to the ASM code are properly validated. > > The test procedure:

Re: [PATCH v1 5/9] selftests: kvm: s390: Add debug print functions

2024-07-09 Thread Claudio Imbrenda
On Tue, 9 Jul 2024 14:57:00 +0200 Christoph Schlameuss wrote: > Add functions to simply print some basic state information in selftests. > > The output can be enabled by setting: > > #define TH_LOG_ENABLED 1 > #define DEBUG 1 > > * print_psw: current SIE state description and VM run s

Re: [PATCH v1 8/9] selftests: kvm: s390: Add uc_skey VM test case

2024-07-09 Thread Claudio Imbrenda
On Tue, 9 Jul 2024 14:57:03 +0200 Christoph Schlameuss wrote: > Add a test case manipulating s390 storage keys from within the ucontrol > VM. > > Signed-off-by: Christoph Schlameuss > --- > .../selftests/kvm/s390x/ucontrol_test.c | 83 +++ > 1 file changed, 83 insertions

Re: [PATCH v1 6/9] selftests: kvm: s390: Add VM run test case

2024-07-09 Thread Claudio Imbrenda
On Tue, 9 Jul 2024 14:57:01 +0200 Christoph Schlameuss wrote: > Add test case running code interacting with registers within a > ucontrol VM. > > * Add uc_gprs test case > > The test uses the same VM setup using the fixture and debug macros > introduced in earlier patches in this series. > >

Re: [PATCH v1 2/9] selftests: kvm: s390: Add kvm_s390_sie_block definition for userspace tests

2024-07-09 Thread Claudio Imbrenda
On Tue, 9 Jul 2024 14:56:57 +0200 Christoph Schlameuss wrote: > Subsequent tests do require direct manipulation of the SIE instruction. > This commit introduces the SIE definition for the selftests. > > There are already definitions of this within the kernel. > This differs in two ways. > * Thi

Re: [PATCH v1 3/9] selftests: kvm: s390: Add s390x ucontrol test suite with hpage test

2024-07-09 Thread Claudio Imbrenda
hugepages. > > To allow testing of the ucontrol interface the kernel needs a > non-default config containing CONFIG_KVM_S390_UCONTROL. > This config needs to be set to built-in (y) as this cannot be built as > module. > > Signed-off-by: Christoph Schlameuss Reviewed-by:

Re: [PATCH v1 1/9] selftests: kvm: s390: Define page sizes in shared header

2024-07-09 Thread Claudio Imbrenda
nes in existing > code. > > Signed-off-by: Christoph Schlameuss Reviewed-by: Claudio Imbrenda > --- > tools/testing/selftests/kvm/include/s390x/processor.h | 5 + > tools/testing/selftests/kvm/lib/s390x/processor.c | 10 +- > tools/testing/selftest

Re: [PATCH v1 9/9] selftests: kvm: s390: Verify reject memory region operations for ucontrol VMs

2024-07-09 Thread Claudio Imbrenda
On Tue, 9 Jul 2024 14:57:04 +0200 Christoph Schlameuss wrote: > Add a test case verifying KVM_SET_USER_MEMORY_REGION and > KVM_SET_USER_MEMORY_REGION2 cannot be executed on ucontrol VMs. > > Executing this test case on not patched kernels will cause a null > pointer dereference in the host kern

Re: [PATCH v1 4/9] selftests: kvm: s390: Add test fixture and simple VM setup tests

2024-07-09 Thread Claudio Imbrenda
created with S390 user > + * controlled virtual machines, this line does not need to end like this, I guess? > + * the resulting vcpu fd can be memory mapped at page offset > + * KVM_S390_SIE_PAGE_OFFSET in order to obtain a memory map > + * of the virtual cpu's hardware control block. > + */ with the comment fixed: Reviewed-by: Claudio Imbrenda [...]

Re: [PATCH] KVM: s390: selftest: memop: Fix undefined behavior

2023-12-18 Thread Claudio Imbrenda
On Mon, 18 Dec 2023 13:18:14 +0100 Nina Schoetterl-Glausch wrote: [...] > > > diff --git a/tools/testing/selftests/kvm/s390x/memop.c > > > b/tools/testing/selftests/kvm/s390x/memop.c > > > index bb3ca9a5d731..2eba9575828e 100644 > > > --- a/tools/testing/selftests/kvm/s390x/memop.c > > > +++ b/

Re: [PATCH] KVM: s390: selftest: memop: Fix undefined behavior

2023-12-15 Thread Claudio Imbrenda
On Fri, 15 Dec 2023 17:11:25 +0100 Nina Schoetterl-Glausch wrote: > If an integer's type has x bits, shifting the integer left by x or more > is undefined behavior. > This can happen in the rotate function when attempting to do a rotation > of the whole value by 0. is 0 the only problematic valu