Re: [PATCH v1 1/6] kvm: s390: Reject setting flic pfault attributes on ucontrol VMs

2024-12-09 Thread Janosch Frank
On 12/9/24 12:07 PM, Christoph Schlameuss wrote: Prevent null pointer dereference when processing the KVM_DEV_FLIC_APF_ENABLE and KVM_DEV_FLIC_APF_DISABLE_WAIT ioctls in the interrupt controller. Reported-by: Claudio Imbrenda Signed-off-by: Christoph Schlameuss Please have a look into the do

Re: [PATCH v1 1/6] kvm: s390: Reject setting flic pfault attributes on ucontrol VMs

2024-12-09 Thread Janosch Frank
On 12/9/24 12:07 PM, Christoph Schlameuss wrote: Prevent null pointer dereference when processing the KVM_DEV_FLIC_APF_ENABLE and KVM_DEV_FLIC_APF_DISABLE_WAIT ioctls in the interrupt controller. Reported-by: Claudio Imbrenda Signed-off-by: Christoph Schlameuss Please add a fixes tag to this

Re: [PATCH v7 2/5] selftests: kvm: s390: Add uc_skey VM test case

2024-11-11 Thread Janosch Frank
. Signed-off-by: Christoph Schlameuss --- Acked-by: Janosch Frank

Re: [PATCH v6 2/5] selftests: kvm: s390: Add uc_skey VM test case

2024-10-18 Thread Janosch Frank
. Signed-off-by: Christoph Schlameuss Acked-by: Janosch Frank

Re: [PATCH v6 2/5] selftests: kvm: s390: Add uc_skey VM test case

2024-10-15 Thread Janosch Frank
On 10/15/24 10:37 AM, Christoph Schlameuss wrote: Add a test case manipulating s390 storage keys from within the ucontrol VM. Storage key instruction (ISKE, SSKE and RRBE) intercepts and Keyless-subset facility are disabled on first use, where the skeys are setup by KVM in non ucontrol VMs. [

Re: [PATCH v5 3/4] selftests: kvm: s390: Verify reject memory region operations for ucontrol VMs

2024-10-08 Thread Janosch Frank
On 10/8/24 2:56 PM, Janosch Frank wrote: On 10/8/24 9:42 AM, 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

Re: [PATCH v5 3/4] selftests: kvm: s390: Verify reject memory region operations for ucontrol VMs

2024-10-08 Thread Janosch Frank
On 10/8/24 9:42 AM, 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 kernel. This is fixed with co

Re: [PATCH v5 4/4] selftests: kvm: s390: Fix whitespace confusion in ucontrol test

2024-10-08 Thread Janosch Frank
On 10/8/24 9:42 AM, Christoph Schlameuss wrote: Checkpatch thinks that we're doing a multiplication but we're obviously not. Fix 4 instances where we adhered to wrong checkpatch advice. Signed-off-by: Christoph Schlameuss Reviewed-by: Janosch Frank

Re: [PATCH v4 4/4] fixup! selftests: kvm: s390: Add VM run test case

2024-09-17 Thread Janosch Frank
On 9/17/24 8:44 AM, Christoph Schlameuss wrote: Fix pointer function arguments whitespaces. Signed-off-by: Christoph Schlameuss Generally we don't use the fixup prefix in upstream development AFAIK. selftests: kvm: s390: Fix whitespace confusion in ucontrol test Checkpatch thinks that we'r

Re: [PATCH v4 2/4] selftests: kvm: s390: Add uc_skey VM test case

2024-09-17 Thread Janosch Frank
On 9/17/24 8:44 AM, Christoph Schlameuss wrote: Add a test case manipulating s390 storage keys from within the ucontrol VM. Signed-off-by: Christoph Schlameuss With the nit fixed: Reviewed-by: Janosch Frank + /* SSKE */ + sync_regs->gprs[1] = skeyvalue; +

Re: [PATCH v4 1/4] selftests: kvm: s390: Add uc_map_unmap VM test case

2024-09-17 Thread Janosch Frank
translation handling to map memory on access. Signed-off-by: Christoph Schlameuss Reviewed-by: Janosch Frank

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

2024-09-15 Thread Janosch Frank
On 9/16/24 8:25 AM, Christoph Schlameuss wrote: On Fri Sep 13, 2024 at 6:48 PM CEST, Claudio Imbrenda wrote: 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 m

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

2024-09-13 Thread Janosch Frank
On 9/13/24 1:52 PM, Christoph Schlameuss wrote: Add a test case manipulating s390 storage keys from within the ucontrol VM. Signed-off-by: Christoph Schlameuss Except for the two nits: Reviewed-by: Janosch Frank I'll think about what to do with the nits next week. --- .../self

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

2024-09-13 Thread Janosch Frank
translation handling to map memory on access. Signed-off-by: Christoph Schlameuss Reviewed-by: Janosch Frank

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

2024-08-23 Thread Janosch Frank
On 8/23/24 3:03 PM, Christoph Schlameuss wrote: On Fri Aug 23, 2024 at 10:02 AM CEST, Janosch Frank wrote: On 8/19/24 6:03 PM, Christoph Schlameuss wrote: On Fri Aug 16, 2024 at 4:29 PM CEST, Janosch Frank wrote: On 8/15/24 5:45 PM, Christoph Schlameuss wrote: Add a test case verifying basic

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

2024-08-23 Thread Janosch Frank
On 8/19/24 6:03 PM, Christoph Schlameuss wrote: On Fri Aug 16, 2024 at 4:29 PM CEST, Janosch Frank wrote: On 8/15/24 5:45 PM, 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

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

2024-08-23 Thread Janosch Frank
On 8/19/24 6:00 PM, Christoph Schlameuss wrote: On Fri Aug 16, 2024 at 4:36 PM CEST, Janosch Frank wrote: On 8/15/24 5:45 PM, Christoph Schlameuss wrote: [...] +TEST_F(uc_kvm, uc_skey) +{ + u64 test_vaddr = self->base_gpa + VM_MEM_SIZE - (SZ_1M / 2); + struct kvm_sync_r

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

2024-08-16 Thread Janosch Frank
On 8/15/24 5:45 PM, 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 | 76 +++ 1 file changed, 76 insertions(+) diff --git a/tools/tes

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

2024-08-16 Thread Janosch Frank
On 8/15/24 5:45 PM, 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 memory and use pic segment

Re: [PATCH v5 00/10] selftests: kvm: s390: Add s390x ucontrol selftests

2024-08-13 Thread Janosch Frank
On 8/7/24 5:45 PM, Christoph Schlameuss wrote: This patch series adds a selftest suite to validate the s390x architecture specific ucontrol KVM interface. When creating a VM on s390x it is possible to create it as userspace controlled VM or in short ucontrol VM. These VMs delegates the managemen

Re: [PATCH v5 07/10] selftests: kvm: s390: Add uc_map_unmap VM test case

2024-08-13 Thread Janosch Frank
On 8/7/24 5:45 PM, 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 memory and use pic segment

Re: [PATCH v4 08/10] selftests: kvm: s390: Add uc_skey VM test case

2024-08-06 Thread Janosch Frank
On 8/2/24 5:59 PM, 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 | 78 +++ 1 file changed, 78 insertions(+) [...] +TEST_F(uc_kv

Re: [PATCH v4 07/10] selftests: kvm: s390: Add uc_map_unmap VM test case

2024-08-06 Thread Janosch Frank
On 8/2/24 5:59 PM, 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 memory and use pic segment

Re: [PATCH v4 06/10] selftests: kvm: s390: Add VM run test case

2024-08-06 Thread Janosch Frank
Schlameuss Reviewed-by: Janosch Frank

Re: [PATCH v3 10/10] s390: Enable KVM_S390_UCONTROL config in debug_defconfig

2024-08-01 Thread Janosch Frank
/configs/debug_defconfig index ea63a7342f5f..0c989caed19a 100644 --- a/arch/s390/configs/debug_defconfig +++ b/arch/s390/configs/debug_defconfig @@ -59,6 +59,7 @@ CONFIG_CMM=m CONFIG_APPLDATA_BASE=y CONFIG_S390_HYPFS_FS=y CONFIG_KVM=m +CONFIG_KVM_S390_UCONTROL=y Reviewed-by: Janosch Frank

Re: [PATCH v3 09/10] selftests: kvm: s390: Verify reject memory region operations for ucontrol VMs

2024-08-01 Thread Janosch Frank
commit: commit 7816e58967d0 ("kvm: s390: Reject memory region operations for ucontrol VMs") Reviewed-by: Janosch Frank

Re: [PATCH v3 07/10] selftests: kvm: s390: Add uc_map_unmap VM test case

2024-08-01 Thread Janosch Frank
On 7/30/24 9:24 AM, 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 memory and use pic segment

Re: [PATCH v3 05/10] selftests: kvm: s390: Add debug print functions

2024-08-01 Thread Janosch Frank
On 7/30/24 9:24 AM, Christoph Schlameuss wrote: [...] +#endif /* SELFTEST_KVM_DEBUG_PRINT_H */ diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c b/tools/testing/selftests/kvm/s390x/ucontrol_test.c index d103a92e7495..029233374465 100644 --- a/tools/testing/selftests/kvm/s390x/ucont

Re: [PATCH v3 06/10] selftests: kvm: s390: Add VM run test case

2024-07-31 Thread Janosch Frank
On 7/30/24 9:24 AM, 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. Signed-off-by: Christoph Schlameu

Re: [PATCH v3 03/10] selftests: kvm: s390: Add s390x ucontrol test suite with hpage test

2024-07-30 Thread Janosch Frank
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: Janosch Frank

Re: [PATCH v3 02/10] selftests: kvm: s390: Add kvm_s390_sie_block definition for userspace tests

2024-07-30 Thread Janosch Frank
Reviewed-by: Janosch Frank

Re: [PATCH v2 06/10] selftests: kvm: s390: Add VM run test case

2024-07-25 Thread Janosch Frank
On 7/23/24 11:31, 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. Signed-off-by: Christoph Schlameuss

Re: [PATCH v2 03/10] selftests: kvm: s390: Add s390x ucontrol test suite with hpage test

2024-07-24 Thread Janosch Frank
On 7/23/24 11:31, Christoph Schlameuss wrote: Add test suite to validate the s390x architecture specific ucontrol KVM interface. Make use of the selftest test harness. * uc_cap_hpage testcase verifies that a ucontrol VM cannot be run with hugepages. To allow testing of the ucontrol interfac

Re: [PATCH v2 02/10] selftests: kvm: s390: Add kvm_s390_sie_block definition for userspace tests

2024-07-24 Thread Janosch Frank
On 7/23/24 11:31, Christoph Schlameuss wrote: Subsequent tests do require direct manipulation of the SIE instruction. This commit introduces the SIE definition for the selftests. AFAIK ucontrol doesn't allow to manipulate the instruction, it allows manipulation of the *SIE control block* that'

Re: [PATCH v2 01/10] selftests: kvm: s390: Define page sizes in shared header

2024-07-24 Thread Janosch Frank
Schlameuss Reviewed-by: Claudio Imbrenda Reviewed-by: Janosch Frank

Re: [PATCH] selftests: drivers/s390x: Use SKIP() during FIXTURE_SETUP

2024-06-04 Thread Janosch Frank
On 5/18/24 02:18, Kees Cook wrote: Instead of mixing selftest harness and ksft helpers, perform SKIP testing from the FIXTURE_SETUPs. This also means TEST_HARNESS_MAIN does not need to be open-coded. Signed-off-by: Kees Cook --- Adding the author in CC. This changes the skip behavior from o

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

2024-02-22 Thread Janosch Frank
memop: Add cmpxchg tests") Signed-off-by: Nina Schoetterl-Glausch Acked-by: Janosch Frank

Re: [PATCH v4 0/2] KVM: s390: Fix AR parameter in ioctl

2024-02-20 Thread Janosch Frank
On 2/20/24 22:12, Eric Farman wrote: Hi Janosch, Here is a new (final?) version for the AR/MEM_OP issue I'm attempting to address. Hopefully they can be picked up to whatever tree makes sense. I've got good and bad news for you :) You need to re-base this patch set on Heiko's feature branch

Re: [PATCH v3 1/2] KVM: s390: fix access register usage in ioctls

2024-02-20 Thread Janosch Frank
On 2/20/24 15:15, Christian Borntraeger wrote: Am 16.02.24 um 22:36 schrieb Eric Farman: The routine ar_translation() can be reached by both the instruction intercept path (where the access registers had been loaded with the guest register contents), and the MEM_OP ioctls (which hadn't). Since