KVM: s390: pull requests for 6.13
Janosch Frank
maintainerPaolo,
here's the second and final tranche of ucontrol tests together with cpumodel sanity tests and the gen 17 cpumodel changes.
Heiko and I decided to move the uvdevice patches through the s390 kernel tree since a set of crypto changes depend on them and we didn't feel like creating a topic branch.
Please pull.
The following changes since commit 8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b:
Linux 6.12-rc2 (2024-10-06 15:32:27 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-next-6.13-1
for you to fetch changes up to 7a1f3143377adb655a3912b8dea714949f819fa3:
KVM: s390: selftests: Add regression tests for PFCR subfunctions (2024-11-11 12:15:44 +0000)
----------------------------------------------------------------
- second part of the ucontrol selftest
- cpumodel sanity check selftest
- gen17 cpumodel changes
----------------------------------------------------------------
Christoph Schlameuss (5):
KVM: s390: selftests: Add uc_map_unmap VM test case
KVM: s390: selftests: Add uc_skey VM test case
KVM: s390: selftests: Verify reject memory region operations for
ucontrol VMs
KVM: s390: selftests: Fix whitespace confusion in ucontrol test
KVM: s390: selftests: correct IP.b length in uc_handle_sieic debug
output
Hariharan Mari (5):
KVM: s390: selftests: Add regression tests for SORTL and DFLTCC CPU
subfunctions
KVM: s390: selftests: Add regression tests for PRNO, KDSA and KMA
crypto subfunctions
KVM: s390: selftests: Add regression tests for KMCTR, KMF, KMO and PCC
crypto subfunctions
KVM: s390: selftests: Add regression tests for KMAC, KMC, KM, KIMD and
KLMD crypto subfunctions
KVM: s390: selftests: Add regression tests for PLO subfunctions
Hendrik Brueckner (4):
KVM: s390: add concurrent-function facility to cpu model
KVM: s390: add msa11 to cpu model
KVM: s390: add gen17 facilities to CPU model
KVM: s390: selftests: Add regression tests for PFCR subfunctions
arch/s390/include/asm/kvm_host.h | 1 + arch/s390/include/uapi/asm/kvm.h | 3 +- arch/s390/kvm/kvm-s390.c | 43 ++- arch/s390/kvm/vsie.c | 3 +- arch/s390/tools/gen_facilities.c | 2 + tools/arch/s390/include/uapi/asm/kvm.h | 3 +- tools/testing/selftests/kvm/Makefile | 2 + .../selftests/kvm/include/s390x/facility.h | 50 +++ .../selftests/kvm/include/s390x/processor.h | 6 + .../selftests/kvm/lib/s390x/facility.c | 14 + .../kvm/s390x/cpumodel_subfuncs_test.c | 301 ++++++++++++++++ .../selftests/kvm/s390x/ucontrol_test.c | 322 +++++++++++++++++- 12 files changed, 737 insertions(+), 13 deletions(-) create mode 100644 tools/testing/selftests/kvm/include/s390x/facility.h create mode 100644 tools/testing/selftests/kvm/lib/s390x/facility.c create mode 100644 tools/testing/selftests/kvm/s390x/cpumodel_subfuncs_test.c
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 01/14] KVM: s390: selftests: Add regression tests for SORTL and DFLTCC CPU subfunctions
From: Hariharan Mari <[email protected]>
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:
1. Create a VM and request the KVM_S390_VM_CPU_MACHINE_SUBFUNC attribute from the KVM_S390_VM_CPU_MODEL group for this VM. This SUBFUNC attribute contains the results of all CPU subfunction instructions.
2. For each tested subfunction (SORTL and DFLTCC), execute the corresponding ASM instruction and capture the result array.
3. Perform a memory comparison between the results stored in the SUBFUNC attribute (obtained in step 1) and the ASM instruction results (obtained in step 2) for each tested subfunction.
This process ensures that the KVM implementation accurately reflects the behavior of the actual CPU instructions for the tested subfunctions.
Message-ID: <[email protected]>
--- tools/testing/selftests/kvm/Makefile | 2 + .../selftests/kvm/include/s390x/facility.h | 50 +++++++++ .../selftests/kvm/lib/s390x/facility.c | 14 +++ .../kvm/s390x/cpumodel_subfuncs_test.c | 105 ++++++++++++++++++ 4 files changed, 171 insertions(+) create mode 100644 tools/testing/selftests/kvm/include/s390x/facility.h create mode 100644 tools/testing/selftests/kvm/lib/s390x/facility.c create mode 100644 tools/testing/selftests/kvm/s390x/cpumodel_subfuncs_test.c
tools/testing/selftests/kvm/Makefile +2 -0
@@ -55,6 +55,7 @@ LIBKVM_aarch64 += lib/aarch64/vgic.c LIBKVM_s390x += lib/s390x/diag318_test_handler.c LIBKVM_s390x += lib/s390x/processor.c LIBKVM_s390x += lib/s390x/ucall.c +LIBKVM_s390x += lib/s390x/facility.c LIBKVM_riscv += lib/riscv/handlers.S LIBKVM_riscv += lib/riscv/processor.c
@@ -189,6 +190,7 @@ TEST_GEN_PROGS_s390x += s390x/sync_regs_test TEST_GEN_PROGS_s390x += s390x/tprot TEST_GEN_PROGS_s390x += s390x/cmma_test TEST_GEN_PROGS_s390x += s390x/debug_test +TEST_GEN_PROGS_s390x += s390x/cpumodel_subfuncs_test TEST_GEN_PROGS_s390x += s390x/shared_zeropage_test TEST_GEN_PROGS_s390x += s390x/ucontrol_test TEST_GEN_PROGS_s390x += demand_paging_test
tools/testing/selftests/kvm/include/s390x/facility.h new file +50 -0
50 lines not on this page · raw message
tools/testing/selftests/kvm/lib/s390x/facility.c new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* +* Copyright IBM Corp. 2024 +* +* Authors: +* Hariharan Mari <[email protected]> +* +* Contains the definition for the global variables to have the test facitlity feature. +*/ + +#include "facility.h" + +uint64_t stfl_doublewords[NB_STFL_DOUBLEWORDS ]; +bool stfle_flag;
tools/testing/selftests/kvm/s390x/cpumodel_subfuncs_test.c new file +105 -0
105 lines not on this page · raw message
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 02/14] KVM: s390: selftests: Add regression tests for PRNO, KDSA and KMA crypto subfunctions
In reply to Janosch FrankFrom: Hariharan Mari <[email protected]>
Extend the existing regression test framework for s390x CPU subfunctions to include tests for the PRNO (Perform Random Number Operation), KDSA (Compute Digital Signature Authentication) and KMA (Cipher Message with Authentication) crypto functions.
The test procedure follows the established pattern:
1. Obtain KVM_S390_VM_CPU_MACHINE_SUBFUNC attribute for the VM.
2. Execute PRNO, KDSA and KMA instructions.
3. Compare KVM-reported results with direct instruction execution results.
Message-ID: <[email protected]>
--- .../kvm/s390x/cpumodel_subfuncs_test.c | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+)
tools/testing/selftests/kvm/s390x/cpumodel_subfuncs_test.c +39 -0
@@ -33,6 +33,39 @@ static void get_cpu_machine_subfuntions(struct kvm_vm *vm,TEST_ASSERT (!r,"Get cpu subfunctions failed r=%d errno=%d" , r, errno); } +/* Testing Crypto Perform Random Number Operation (PRNO) CPU subfunction's ASM block */ +static void test_prno_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" la %%r1,%[query]\n" +" xgr %%r0,%%r0\n" +" .insn rre,0xb93c0000,2,4\n" + : [query]"=R" (*query) + : + :"cc" ,"r0" ,"r1" ); +} + +/* Testing Crypto Cipher Message with Authentication (KMA) CPU subfunction's ASM block */ +static void test_kma_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" la %%r1,%[query]\n" +" xgr %%r0,%%r0\n" +" .insn rrf,0xb9290000,2,4,6,0\n" + : [query]"=R" (*query) + : + :"cc" ,"r0" ,"r1" ); +} + +/* Testing Crypto Compute Digital Signature Authentication (KDSA) CPU subfunction's ASM block */ +static void test_kdsa_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" la %%r1,%[query]\n" +" xgr %%r0,%%r0\n" +" .insn rre,0xb93a0000,0,2\n" + : [query]"=R" (*query) + : + :"cc" ,"r0" ,"r1" ); +} +/* Testing Sort Lists (SORTL) CPU subfunction's ASM block */ static void test_sortl_asm_block (u8 (*query)[32 ]) {
@@ -64,6 +97,12 @@ struct testdef {testfunc_t test;int facility_bit; } testlist[] = { +/* MSA5 - Facility bit 57 */ + { "PPNO", cpu_subfunc.ppno, sizeof(cpu_subfunc.ppno), test_prno_asm_block, 57 }, +/* MSA8 - Facility bit 146 */ + { "KMA", cpu_subfunc.kma, sizeof(cpu_subfunc.kma), test_kma_asm_block, 146 }, +/* MSA9 - Facility bit 155 */ + { "KDSA", cpu_subfunc.kdsa, sizeof(cpu_subfunc.kdsa), test_kdsa_asm_block, 155 },/* SORTL - Facility bit 150 */ { "SORTL", cpu_subfunc.sortl, sizeof(cpu_subfunc.sortl), test_sortl_asm_block, 150 }, /* DFLTCC - Facility bit 151 */
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 03/14] KVM: s390: selftests: Add regression tests for KMCTR, KMF, KMO and PCC crypto subfunctions
In reply to Janosch FrankFrom: Hariharan Mari <[email protected]>
Extend the existing regression test framework for s390x CPU subfunctions to include tests for the KMCTR (Cipher Message with Counter) KMO (Cipher Message with Output Feedback), KMF (Cipher Message with Cipher Feedback) and PCC (Perform Cryptographic Computation) crypto functions.
The test procedure follows the established pattern.
Message-ID: <[email protected]>
--- .../kvm/s390x/cpumodel_subfuncs_test.c | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+)
tools/testing/selftests/kvm/s390x/cpumodel_subfuncs_test.c +49 -0
@@ -33,6 +33,50 @@ static void get_cpu_machine_subfuntions(struct kvm_vm *vm,TEST_ASSERT (!r,"Get cpu subfunctions failed r=%d errno=%d" , r, errno); } +/* Testing Crypto Cipher Message with Counter (KMCTR) CPU subfunction's ASM block */ +static void test_kmctr_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" la %%r1,%[query]\n" +" xgr %%r0,%%r0\n" +" .insn rrf,0xb92d0000,2,4,6,0\n" + : [query]"=R" (*query) + : + :"cc" ,"r0" ,"r1" ); +} + +/* Testing Crypto Cipher Message with Cipher Feedback (KMF) CPU subfunction's ASM block */ +static void test_kmf_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" la %%r1,%[query]\n" +" xgr %%r0,%%r0\n" +" .insn rre,0xb92a0000,2,4\n" + : [query]"=R" (*query) + : + :"cc" ,"r0" ,"r1" ); +} + +/* Testing Crypto Cipher Message with Output Feedback (KMO) CPU subfunction's ASM block */ +static void test_kmo_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" la %%r1,%[query]\n" +" xgr %%r0,%%r0\n" +" .insn rre,0xb92b0000,2,4\n" + : [query]"=R" (*query) + : + :"cc" ,"r0" ,"r1" ); +} + +/* Testing Crypto Perform Cryptographic Computation (PCC) CPU subfunction's ASM block */ +static void test_pcc_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" la %%r1,%[query]\n" +" xgr %%r0,%%r0\n" +" .insn rre,0xb92c0000,0,0\n" + : [query]"=R" (*query) + : + :"cc" ,"r0" ,"r1" ); +} +/* Testing Crypto Perform Random Number Operation (PRNO) CPU subfunction's ASM block */ static void test_prno_asm_block (u8 (*query)[16 ]) {
@@ -97,6 +141,11 @@ struct testdef {testfunc_t test;int facility_bit; } testlist[] = { +/* MSA - Facility bit 77 */ + { "KMCTR", cpu_subfunc.kmctr, sizeof(cpu_subfunc.kmctr), test_kmctr_asm_block, 77 }, + { "KMF", cpu_subfunc.kmf, sizeof(cpu_subfunc.kmf), test_kmf_asm_block, 77 }, + { "KMO", cpu_subfunc.kmo, sizeof(cpu_subfunc.kmo), test_kmo_asm_block, 77 }, + { "PCC", cpu_subfunc.pcc, sizeof(cpu_subfunc.pcc), test_pcc_asm_block, 77 },/* MSA5 - Facility bit 57 */ { "PPNO", cpu_subfunc.ppno, sizeof(cpu_subfunc.ppno), test_prno_asm_block, 57 }, /* MSA8 - Facility bit 146 */
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 05/14] KVM: s390: selftests: Add regression tests for PLO subfunctions
In reply to Janosch FrankFrom: Hariharan Mari <[email protected]>
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 assumed PLO is always installed in the Z Arch. The test procedure follows the established pattern.
Message-ID: <[email protected]>
--- .../kvm/s390x/cpumodel_subfuncs_test.c | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+)
tools/testing/selftests/kvm/s390x/cpumodel_subfuncs_test.c +32 -0
@@ -19,6 +19,8 @@#include "kvm_util.h" +#define PLO_FUNCTION_MAX 256 +/* Query available CPU subfunctions */ struct kvm_s390_vm_cpu_subfunc cpu_subfunc;
@@ -33,6 +35,31 @@ static void get_cpu_machine_subfuntions(struct kvm_vm *vm,TEST_ASSERT (!r,"Get cpu subfunctions failed r=%d errno=%d" , r, errno); } +static inline int plo_test_bit (unsigned char nr) +{ +unsigned long function = nr |0x100 ; +int cc; + + asmvolatile (" lgr 0,%[function]\n" +/* Parameter registers are ignored for "test bit" */ +" plo 0,0,0,0(0)\n" +" ipm %0\n" +" srl %0,28\n" + :"=d" (cc) + : [function]"d" (function) + :"cc" ,"0" ); +return cc ==0 ; +} + +/* Testing Perform Locked Operation (PLO) CPU subfunction's ASM block */ +static void test_plo_asm_block (u8 (*query)[32 ]) +{ +for (int i =0 ; i <PLO_FUNCTION_MAX ; ++i) { +if (plo_test_bit (i)) + (*query)[i >>3 ] |=0x80 >> (i &7 ); + } +} +/* Testing Crypto Compute Message Authentication Code (KMAC) CPU subfunction's ASM block */ static void test_kmac_asm_block (u8 (*query)[16 ]) {
@@ -196,6 +223,11 @@ struct testdef {testfunc_t test;int facility_bit; } testlist[] = { +/* +* PLO was introduced in the very first 64-bit machine generation. +* Hence it is assumed PLO is always installed in Z Arch. +*/ + { "PLO", cpu_subfunc.plo, sizeof(cpu_subfunc.plo), test_plo_asm_block, 1 },/* MSA - Facility bit 17 */ { "KMAC", cpu_subfunc.kmac, sizeof(cpu_subfunc.kmac), test_kmac_asm_block, 17 }, { "KMC", cpu_subfunc.kmc, sizeof(cpu_subfunc.kmc), test_kmc_asm_block, 17 },
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 09/14] KVM: s390: selftests: Fix whitespace confusion in ucontrol test
In reply to Janosch FrankFrom: Christoph Schlameuss <[email protected]>
Checkpatch thinks that we're doing a multiplication but we're obviously not. Fix 4 instances where we adhered to wrong checkpatch advice.
Message-ID: <[email protected]>
--- tools/testing/selftests/kvm/s390x/ucontrol_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tools/testing/selftests/kvm/s390x/ucontrol_test.c +4 -4
@@ -370,7 +370,7 @@ static bool uc_handle_insn_ic(FIXTURE_DATA(uc_kvm) *self)* * fail on codes not expected in the test cases * Returns if interception is handled / execution can be continued */ -static bool uc_handle_sieic (FIXTURE_DATA (uc_kvm) * self) +static bool uc_handle_sieic (FIXTURE_DATA (uc_kvm) *self) {struct kvm_s390_sie_block *sie_block = self->sie_block;struct kvm_run *run = self->run;
@@ -398,7 +398,7 @@ static bool uc_handle_sieic(FIXTURE_DATA(uc_kvm) * self) }/* verify VM state on exit */ -static bool uc_handle_exit (FIXTURE_DATA (uc_kvm) * self) +static bool uc_handle_exit (FIXTURE_DATA (uc_kvm) *self) {struct kvm_run *run = self->run;
@@ -418,7 +418,7 @@ static bool uc_handle_exit(FIXTURE_DATA(uc_kvm) * self) }/* run the VM until interrupted */ -static int uc_run_once (FIXTURE_DATA (uc_kvm) * self) +static int uc_run_once (FIXTURE_DATA (uc_kvm) *self) {int rc;
@@ -429,7 +429,7 @@ static int uc_run_once(FIXTURE_DATA(uc_kvm) * self)return rc; } -static void uc_assert_diag44 (FIXTURE_DATA (uc_kvm) * self) +static void uc_assert_diag44 (FIXTURE_DATA (uc_kvm) *self) {struct kvm_s390_sie_block *sie_block = self->sie_block;
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 06/14] KVM: s390: selftests: Add uc_map_unmap VM test case
In reply to Janosch FrankFrom: Christoph Schlameuss <[email protected]>
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 translation handling to map memory on access.
Link:
https://lore.kernel.org/r/[email protected]
Message-ID: <[email protected]>
--- .../selftests/kvm/s390x/ucontrol_test.c | 145 +++++++++++++++++- 1 file changed, 144 insertions(+), 1 deletion(-)
tools/testing/selftests/kvm/s390x/ucontrol_test.c +144 -1
@@ -16,7 +16,11 @@#include <linux/capability.h> #include <linux/sizes.h> +#define PGM_SEGMENT_TRANSLATION 0x10 +#define VM_MEM_SIZE (4 * SZ_1M) +#define VM_MEM_EXT_SIZE (2 * SZ_1M) +#define VM_MEM_MAX_M ((VM_MEM_SIZE + VM_MEM_EXT_SIZE) / SZ_1M)/* so directly declare capget to check caps without libcap */ int capget (cap_user_header_t header,cap_user_data_t data);
@@ -58,6 +62,23 @@ asm("test_gprs_asm:\n"" j 0b\n" ); +/* Test program manipulating memory */ +extern char test_mem_asm[]; +asm("test_mem_asm:\n" +"xgr %r0, %r0\n" + +"0:\n" +" ahi %r0,1\n" +" st %r1,0(%r5,%r6)\n" + +" xgr %r1,%r1\n" +" l %r1,0(%r5,%r6)\n" +" ahi %r0,1\n" +" diag 0,0,0x44\n" + +" j 0b\n" +); +FIXTURE (uc_kvm) {struct kvm_s390_sie_block *sie_block;
@@ -67,6 +88,7 @@ FIXTURE(uc_kvm)uintptr_t base_hva;uintptr_t code_hva;int kvm_run_size; +vm_paddr_t pgd;void *vm_mem;int vcpu_fd;int kvm_fd;
@@ -116,7 +138,7 @@ FIXTURE_SETUP(uc_kvm) self->base_gpa =0 ; self->code_gpa = self->base_gpa + (3 *SZ_1M ); - self->vm_mem =aligned_alloc (SZ_1M ,VM_MEM_SIZE ); + self->vm_mem =aligned_alloc (SZ_1M ,VM_MEM_MAX_M *SZ_1M ); ASSERT_NE(NULL, self->vm_mem) TH_LOG("malloc failed %u", errno); self->base_hva = (uintptr_t )self->vm_mem; self->code_hva = self->base_hva - self->base_gpa + self->code_gpa;
@@ -222,6 +244,60 @@ TEST(uc_cap_hpage)close (kvm_fd); } +/* calculate host virtual addr from guest physical addr */ +static void *gpa2hva (FIXTURE_DATA (uc_kvm) *self,u64 gpa) +{ +return (void *)(self->base_hva - self->base_gpa + gpa); +} + +/* map / make additional memory available */ +static int uc_map_ext (FIXTURE_DATA (uc_kvm) *self,u64 vcpu_addr,u64 length) +{ +struct kvm_s390_ucas_mapping map = { + .user_addr = (u64 )gpa2hva (self, vcpu_addr), + .vcpu_addr = vcpu_addr, + .length = length, + }; +pr_info ("ucas map %p %p 0x%llx" , + (void *)map.user_addr, (void *)map.vcpu_addr, map.length); +return ioctl (self->vcpu_fd,KVM_S390_UCAS_MAP , &map); +} + +/* unmap previously mapped memory */ +static int uc_unmap_ext (FIXTURE_DATA (uc_kvm) *self,u64 vcpu_addr,u64 length) +{ +struct kvm_s390_ucas_mapping map = { + .user_addr = (u64 )gpa2hva (self, vcpu_addr), + .vcpu_addr = vcpu_addr, + .length = length, + }; +pr_info ("ucas unmap %p %p 0x%llx" , + (void *)map.user_addr, (void *)map.vcpu_addr, map.length); +return ioctl (self->vcpu_fd,KVM_S390_UCAS_UNMAP , &map); +} + +/* handle ucontrol exit by mapping the accessed segment */ +static void uc_handle_exit_ucontrol (FIXTURE_DATA (uc_kvm) *self) +{ +struct kvm_run *run = self->run; +u64 seg_addr; +int rc; + +TEST_ASSERT_EQ (KVM_EXIT_S390_UCONTROL , run->exit_reason); +switch (run->s390_ucontrol.pgm_code) { +case PGM_SEGMENT_TRANSLATION : + seg_addr = run->s390_ucontrol.trans_exc_code & ~(SZ_1M -1 ); +pr_info ("ucontrol pic segment translation 0x%llx, mapping segment 0x%lx\n" , + run->s390_ucontrol.trans_exc_code, seg_addr); +/* map / make additional memory available */ + rc =uc_map_ext (self, seg_addr,SZ_1M ); +TEST_ASSERT_EQ (0 , rc); +break ; +default : +TEST_FAIL ("UNEXPECTED PGM CODE %d" , run->s390_ucontrol.pgm_code); + } +} +/* verify SIEIC exit * * fail on codes not expected in the test cases */
@@ -255,6 +331,12 @@ static bool uc_handle_exit(FIXTURE_DATA(uc_kvm) * self)struct kvm_run *run = self->run;switch (run->exit_reason) { +case KVM_EXIT_S390_UCONTROL : +/** check program interruption code +* handle page fault --> ucas map +*/ +uc_handle_exit_ucontrol (self); +break ;case KVM_EXIT_S390_SIEIC :return uc_handle_sieic (self);default :
@@ -286,6 +368,67 @@ static void uc_assert_diag44(FIXTURE_DATA(uc_kvm) * self)TEST_ASSERT_EQ (0x440000 , sie_block->ipb); } +TEST_F(uc_kvm, uc_map_unmap) +{ +struct kvm_sync_regs *sync_regs = &self->run->s.regs; +struct kvm_run *run = self->run; +const u64 disp =1 ; +int rc; + +/* copy test_mem_asm to code_hva / code_gpa */ +TH_LOG ("copy code %p to vm mapped memory %p / %p" , + &test_mem_asm, (void *)self->code_hva, (void *)self->code_gpa); +memcpy ((void *)self->code_hva, &test_mem_asm,PAGE_SIZE ); + +/* DAT disabled + 64 bit mode */ + run->psw_mask =0x0000000180000000ULL ; + run->psw_addr = self->code_gpa; + +/* set register content for test_mem_asm to access not mapped memory*/ + sync_regs->gprs[1 ] =0x55 ; + sync_regs->gprs[5 ] = self->base_gpa; + sync_regs->gprs[6 ] =VM_MEM_SIZE + disp; + run->kvm_dirty_regs |=KVM_SYNC_GPRS ; + +/* run and expect to fail with ucontrol pic segment translation */ +ASSERT_EQ (0 ,uc_run_once (self)); +ASSERT_EQ (1 , sync_regs->gprs[0 ]); +ASSERT_EQ (KVM_EXIT_S390_UCONTROL , run->exit_reason); + +ASSERT_EQ (PGM_SEGMENT_TRANSLATION , run->s390_ucontrol.pgm_code); +ASSERT_EQ (self->base_gpa +VM_MEM_SIZE , run->s390_ucontrol.trans_exc_code); + +/* fail to map memory with not segment aligned address */ + rc =uc_map_ext (self, self->base_gpa +VM_MEM_SIZE + disp,VM_MEM_EXT_SIZE ); + ASSERT_GT(0, rc) +TH_LOG ("ucas map for non segment address should fail but didn't; " +"result %d not expected, %s" , rc,strerror (errno)); + +/* map / make additional memory available */ + rc =uc_map_ext (self, self->base_gpa +VM_MEM_SIZE ,VM_MEM_EXT_SIZE ); + ASSERT_EQ(0, rc) +TH_LOG ("ucas map result %d not expected, %s" , rc,strerror (errno)); +ASSERT_EQ (0 ,uc_run_once (self)); +ASSERT_EQ (false,uc_handle_exit (self)); +uc_assert_diag44 (self); + +/* assert registers and memory are in expected state */ +ASSERT_EQ (2 , sync_regs->gprs[0 ]); +ASSERT_EQ (0x55 , sync_regs->gprs[1 ]); +ASSERT_EQ (0x55 , *(u32 *)gpa2hva (self, self->base_gpa +VM_MEM_SIZE + disp)); + +/* unmap and run loop again */ + rc =uc_unmap_ext (self, self->base_gpa +VM_MEM_SIZE ,VM_MEM_EXT_SIZE ); + ASSERT_EQ(0, rc) +TH_LOG ("ucas unmap result %d not expected, %s" , rc,strerror (errno)); +ASSERT_EQ (0 ,uc_run_once (self)); +ASSERT_EQ (3 , sync_regs->gprs[0 ]); +ASSERT_EQ (KVM_EXIT_S390_UCONTROL , run->exit_reason); +ASSERT_EQ (PGM_SEGMENT_TRANSLATION , run->s390_ucontrol.pgm_code); +/* handle ucontrol exit and remap memory after previous map and unmap */ +ASSERT_EQ (true,uc_handle_exit (self)); +} + TEST_F(uc_kvm, uc_gprs) {struct kvm_sync_regs *sync_regs = &self->run->s.regs;
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 07/14] KVM: s390: selftests: Add uc_skey VM test case
In reply to Janosch FrankFrom: Christoph Schlameuss <[email protected]>
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.
Message-ID: <[email protected]>
--- .../selftests/kvm/include/s390x/processor.h | 6 + .../selftests/kvm/s390x/ucontrol_test.c | 145 +++++++++++++++++- 2 files changed, 149 insertions(+), 2 deletions(-)
tools/testing/selftests/kvm/include/s390x/processor.h +6 -0
@@ -32,4 +32,10 @@ static inline void cpu_relax(void) barrier(); } +/* Get the instruction length */ +static inline int insn_length (unsigned char code) +{ +return ((((int )code +64 ) >>7 ) +1 ) <<1 ; +} +#endif
tools/testing/selftests/kvm/s390x/ucontrol_test.c +143 -2
168 lines not on this page · raw message
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 08/14] KVM: s390: selftests: Verify reject memory region operations for ucontrol VMs
In reply to Janosch FrankFrom: Christoph Schlameuss <[email protected]>
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 commit:
commit 7816e58967d0 ("kvm: s390: Reject memory region operations for ucontrol VMs")
Message-ID: <[email protected]>
--- .../selftests/kvm/s390x/ucontrol_test.c | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+)
tools/testing/selftests/kvm/s390x/ucontrol_test.c +22 -0
@@ -440,6 +440,28 @@ static void uc_assert_diag44(FIXTURE_DATA(uc_kvm) * self)TEST_ASSERT_EQ (0x440000 , sie_block->ipb); } +TEST_F(uc_kvm, uc_no_user_region) +{ +struct kvm_userspace_memory_region region = { + .slot =1 , + .guest_phys_addr = self->code_gpa, + .memory_size =VM_MEM_EXT_SIZE , + .userspace_addr = (uintptr_t )self->code_hva, + }; +struct kvm_userspace_memory_region2 region2 = { + .slot =1 , + .guest_phys_addr = self->code_gpa, + .memory_size =VM_MEM_EXT_SIZE , + .userspace_addr = (uintptr_t )self->code_hva, + }; + +ASSERT_EQ (-1 ,ioctl (self->vm_fd,KVM_SET_USER_MEMORY_REGION , ®ion)); +ASSERT_EQ (EINVAL , errno); + +ASSERT_EQ (-1 ,ioctl (self->vm_fd,KVM_SET_USER_MEMORY_REGION2 , ®ion2)); +ASSERT_EQ (EINVAL , errno); +} + TEST_F(uc_kvm, uc_map_unmap) {struct kvm_sync_regs *sync_regs = &self->run->s.regs;
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 10/14] KVM: s390: selftests: correct IP.b length in uc_handle_sieic debug output
In reply to Janosch FrankFrom: Christoph Schlameuss <[email protected]>
The length of the interrupt parameters (IP) are:
a: 2 bytes
b: 4 bytes
Message-ID: <[email protected]>
--- tools/testing/selftests/kvm/s390x/ucontrol_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/kvm/s390x/ucontrol_test.c +1 -1
@@ -376,7 +376,7 @@ static bool uc_handle_sieic(FIXTURE_DATA(uc_kvm) *self)struct kvm_run *run = self->run;/* check SIE interception code */ -pr_info ("sieic: 0x%.2x 0x%.4x 0x%.4x\n" , +pr_info ("sieic: 0x%.2x 0x%.4x 0x%.8x\n" , run->s390_sieic.icptcode, run->s390_sieic.ipa, run->s390_sieic.ipb);
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 11/14] KVM: s390: add concurrent-function facility to cpu model
In reply to Janosch FrankFrom: Hendrik Brueckner <[email protected]>
Adding support for concurrent-functions facility which provides additional subfunctions.
Message-ID: <[email protected]>
--- arch/s390/include/uapi/asm/kvm.h | 3 ++- arch/s390/kvm/kvm-s390.c | 22 ++++++++++++++++++++++ arch/s390/tools/gen_facilities.c | 1 + 3 files changed, 25 insertions(+), 1 deletion(-)
arch/s390/include/uapi/asm/kvm.h +2 -1
@@ -469,7 +469,8 @@ struct kvm_s390_vm_cpu_subfunc {__u8 kdsa[16 ];/* with MSA9 */ __u8 sortl[32 ];/* with STFLE.150 */ __u8 dfltcc[32 ];/* with STFLE.151 */ -__u8 reserved[1728 ]; +__u8 pfcr[16 ];/* with STFLE.201 */ +__u8 reserved[1712 ]; };#define KVM_S390_VM_CPU_PROCESSOR_UV_FEAT_GUEST 6
arch/s390/kvm/kvm-s390.c +22 -0
@@ -348,6 +348,16 @@ static inline int plo_test_bit(unsigned char nr)return cc ==0 ; } +static __always_inline void pfcr_query(u8 (*query)[16]) +{ + asmvolatile ( +" lghi 0,0\n" +" .insn rsy,0xeb0000000016,0,0,%[query]\n" + : [query]"=QS" (*query) + : + :"cc" ,"0" ); +} + static __always_inline void __sortl_query(u8 (*query)[32]) { asm volatile(
@@ -429,6 +439,9 @@ static void __init kvm_s390_cpu_feat_init(void)if (test_facility (151 ))/* DFLTCC */ __dfltcc_query (&kvm_s390_available_subfunc.dfltcc); +if (test_facility (201 ))/* PFCR */ +pfcr_query (&kvm_s390_available_subfunc.pfcr); +if (MACHINE_HAS_ESOP )allow_cpu_feat (KVM_S390_VM_CPU_FEAT_ESOP );/*
@@ -1543,6 +1556,9 @@ static int kvm_s390_set_processor_subfunc(struct kvm *kvm, ((unsigned long *) &kvm->arch.model.subfuncs.dfltcc)[1 ], ((unsigned long *) &kvm->arch.model.subfuncs.dfltcc)[2 ], ((unsigned long *) &kvm->arch.model.subfuncs.dfltcc)[3]); +VM_EVENT (kvm,3 ,"GET: guest PFCR subfunc 0x%16.16lx.%16.16lx" , + ((unsigned long *) &kvm_s390_available_subfunc.pfcr)[0 ], + ((unsigned long *) &kvm_s390_available_subfunc.pfcr)[1 ]);return 0 ; }
@@ -1757,6 +1773,9 @@ static int kvm_s390_get_processor_subfunc(struct kvm *kvm, ((unsigned long *) &kvm->arch.model.subfuncs.dfltcc)[1 ], ((unsigned long *) &kvm->arch.model.subfuncs.dfltcc)[2 ], ((unsigned long *) &kvm->arch.model.subfuncs.dfltcc)[3]); +VM_EVENT (kvm,3 ,"GET: guest PFCR subfunc 0x%16.16lx.%16.16lx" , + ((unsigned long *) &kvm_s390_available_subfunc.pfcr)[0 ], + ((unsigned long *) &kvm_s390_available_subfunc.pfcr)[1 ]);return 0 ; }
@@ -1825,6 +1844,9 @@ static int kvm_s390_get_machine_subfunc(struct kvm *kvm, ((unsigned long *) &kvm_s390_available_subfunc.dfltcc)[1 ], ((unsigned long *) &kvm_s390_available_subfunc.dfltcc)[2 ], ((unsigned long *) &kvm_s390_available_subfunc.dfltcc)[3]); +VM_EVENT (kvm,3 ,"GET: host PFCR subfunc 0x%16.16lx.%16.16lx" , + ((unsigned long *) &kvm_s390_available_subfunc.pfcr)[0 ], + ((unsigned long *) &kvm_s390_available_subfunc.pfcr)[1 ]);return 0 ; }
arch/s390/tools/gen_facilities.c +1 -0
@@ -113,6 +113,7 @@ static struct facility_def facility_defs[] = {194 ,/* rdp enhancement facility */ 196 ,/* processor activity instrumentation facility */ 197 ,/* processor activity instrumentation extension 1 */ +201 ,/* concurrent-functions facility */ -1 /* END */ } },
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 12/14] KVM: s390: add msa11 to cpu model
In reply to Janosch FrankFrom: Hendrik Brueckner <[email protected]>
Message-security-assist 11 introduces pckmo subfunctions to encrypt hmac keys.
Message-ID: <[email protected]>
--- arch/s390/include/asm/kvm_host.h | 1 + arch/s390/kvm/kvm-s390.c | 13 +++++++++++-- arch/s390/kvm/vsie.c | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-)
arch/s390/include/asm/kvm_host.h +1 -0
@@ -356,6 +356,7 @@ struct kvm_s390_sie_block {#define ECD_MEF 0x08000000#define ECD_ETOKENF 0x02000000#define ECD_ECC 0x00200000 +#define ECD_HMAC 0x00004000__u32 ecd;/* 0x01c8 */ __u8 reserved1cc[18 ];/* 0x01cc */ __u64 pp;/* 0x01de */
arch/s390/kvm/kvm-s390.c +11 -2
@@ -3796,6 +3796,13 @@ static bool kvm_has_pckmo_ecc(struct kvm *kvm) } +static bool kvm_has_pckmo_hmac (struct kvm *kvm) +{ +/* At least one HMAC subfunction must be present */ +return kvm_has_pckmo_subfunc (kvm,118 ) || +kvm_has_pckmo_subfunc (kvm,122 ); +} +static void kvm_s390_vcpu_crypto_setup (struct kvm_vcpu *vcpu) {/*
@@ -3808,7 +3815,7 @@ static void kvm_s390_vcpu_crypto_setup(struct kvm_vcpu *vcpu) vcpu->arch.sie_block->crycbd = vcpu->kvm->arch.crypto.crycbd; vcpu->arch.sie_block->ecb3 &= ~(ECB3_AES |ECB3_DEA ); vcpu->arch.sie_block->eca &= ~ECA_APIE ; - vcpu->arch.sie_block->ecd &= ~ECD_ECC ; + vcpu->arch.sie_block->ecd &= ~(ECD_ECC |ECD_HMAC );if (vcpu->kvm->arch.crypto.apie) vcpu->arch.sie_block->eca |=ECA_APIE ;
@@ -3816,9 +3823,11 @@ static void kvm_s390_vcpu_crypto_setup(struct kvm_vcpu *vcpu)/* Set up protected key support */ if (vcpu->kvm->arch.crypto.aes_kw) { vcpu->arch.sie_block->ecb3 |=ECB3_AES ; -/* ecc is also wrapped with AES key */ +/* ecc/hmac is also wrapped with AES key */ if (kvm_has_pckmo_ecc (vcpu->kvm)) vcpu->arch.sie_block->ecd |=ECD_ECC ; +if (kvm_has_pckmo_hmac (vcpu->kvm)) + vcpu->arch.sie_block->ecd |=ECD_HMAC ; }if (vcpu->kvm->arch.crypto.dea_kw)
arch/s390/kvm/vsie.c +2 -1
@@ -335,7 +335,8 @@ static int shadow_crycb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)/* we may only allow it if enabled for guest 2 */ ecb3_flags = scb_o->ecb3 & vcpu->arch.sie_block->ecb3 & (ECB3_AES |ECB3_DEA ); - ecd_flags = scb_o->ecd & vcpu->arch.sie_block->ecd &ECD_ECC ; + ecd_flags = scb_o->ecd & vcpu->arch.sie_block->ecd & + (ECD_ECC |ECD_HMAC );if (!ecb3_flags && !ecd_flags) goto end;
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 04/14] KVM: s390: selftests: Add regression tests for KMAC, KMC, KM, KIMD and KLMD crypto subfunctions
In reply to Janosch FrankFrom: Hariharan Mari <[email protected]>
Extend the existing regression test framework for s390x CPU subfunctions to include tests for the KMAC (Compute Message Authentication Code), KMC (Cipher Message with Chaining), KM (Cipher Message) KIMD (Compute Intermediate Message Digest) and KLMD (Compute Last Message Digest) crypto functions.
The test procedure follows the established pattern.
Message-ID: <[email protected]>
--- .../kvm/s390x/cpumodel_subfuncs_test.c | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+)
tools/testing/selftests/kvm/s390x/cpumodel_subfuncs_test.c +61 -0
@@ -33,6 +33,61 @@ static void get_cpu_machine_subfuntions(struct kvm_vm *vm,TEST_ASSERT (!r,"Get cpu subfunctions failed r=%d errno=%d" , r, errno); } +/* Testing Crypto Compute Message Authentication Code (KMAC) CPU subfunction's ASM block */ +static void test_kmac_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" la %%r1,%[query]\n" +" xgr %%r0,%%r0\n" +" .insn rre,0xb91e0000,0,2\n" + : [query]"=R" (*query) + : + :"cc" ,"r0" ,"r1" ); +} + +/* Testing Crypto Cipher Message with Chaining (KMC) CPU subfunction's ASM block */ +static void test_kmc_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" la %%r1,%[query]\n" +" xgr %%r0,%%r0\n" +" .insn rre,0xb92f0000,2,4\n" + : [query]"=R" (*query) + : + :"cc" ,"r0" ,"r1" ); +} + +/* Testing Crypto Cipher Message (KM) CPU subfunction's ASM block */ +static void test_km_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" la %%r1,%[query]\n" +" xgr %%r0,%%r0\n" +" .insn rre,0xb92e0000,2,4\n" + : [query]"=R" (*query) + : + :"cc" ,"r0" ,"r1" ); +} + +/* Testing Crypto Compute Intermediate Message Digest (KIMD) CPU subfunction's ASM block */ +static void test_kimd_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" la %%r1,%[query]\n" +" xgr %%r0,%%r0\n" +" .insn rre,0xb93e0000,0,2\n" + : [query]"=R" (*query) + : + :"cc" ,"r0" ,"r1" ); +} + +/* Testing Crypto Compute Last Message Digest (KLMD) CPU subfunction's ASM block */ +static void test_klmd_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" la %%r1,%[query]\n" +" xgr %%r0,%%r0\n" +" .insn rre,0xb93f0000,0,2\n" + : [query]"=R" (*query) + : + :"cc" ,"r0" ,"r1" ); +} +/* Testing Crypto Cipher Message with Counter (KMCTR) CPU subfunction's ASM block */ static void test_kmctr_asm_block (u8 (*query)[16 ]) {
@@ -141,6 +196,12 @@ struct testdef {testfunc_t test;int facility_bit; } testlist[] = { +/* MSA - Facility bit 17 */ + { "KMAC", cpu_subfunc.kmac, sizeof(cpu_subfunc.kmac), test_kmac_asm_block, 17 }, + { "KMC", cpu_subfunc.kmc, sizeof(cpu_subfunc.kmc), test_kmc_asm_block, 17 }, + { "KM", cpu_subfunc.km, sizeof(cpu_subfunc.km), test_km_asm_block, 17 }, + { "KIMD", cpu_subfunc.kimd, sizeof(cpu_subfunc.kimd), test_kimd_asm_block, 17 }, + { "KLMD", cpu_subfunc.klmd, sizeof(cpu_subfunc.klmd), test_klmd_asm_block, 17 },/* MSA - Facility bit 77 */ { "KMCTR", cpu_subfunc.kmctr, sizeof(cpu_subfunc.kmctr), test_kmctr_asm_block, 77 }, { "KMF", cpu_subfunc.kmf, sizeof(cpu_subfunc.kmf), test_kmf_asm_block, 77 },
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 13/14] KVM: s390: add gen17 facilities to CPU model
In reply to Janosch FrankFrom: Hendrik Brueckner <[email protected]>
Add gen17 facilities and let KVM_CAP_S390_VECTOR_REGISTERS handle the enablement of the vector extension facilities.
Message-ID: <[email protected]>
--- arch/s390/kvm/kvm-s390.c | 8 ++++++++ arch/s390/tools/gen_facilities.c | 1 + 2 files changed, 9 insertions(+)
arch/s390/kvm/kvm-s390.c +8 -0
@@ -812,6 +812,14 @@ int kvm_vm_ioctl_enable_cap(struct kvm *kvm, struct kvm_enable_cap *cap)set_kvm_facility (kvm->arch.model.fac_mask,192 );set_kvm_facility (kvm->arch.model.fac_list,192 ); } +if (test_facility (198 )) { +set_kvm_facility (kvm->arch.model.fac_mask,198 ); +set_kvm_facility (kvm->arch.model.fac_list,198 ); + } +if (test_facility (199 )) { +set_kvm_facility (kvm->arch.model.fac_mask,199 ); +set_kvm_facility (kvm->arch.model.fac_list,199 ); + } r =0 ; }else r = -EINVAL ;
arch/s390/tools/gen_facilities.c +1 -0
@@ -109,6 +109,7 @@ static struct facility_def facility_defs[] = {15 ,/* AP Facilities Test */ 156 ,/* etoken facility */ 165 ,/* nnpa facility */ +170 ,/* ineffective-nonconstrained-transaction facility */ 193 ,/* bear enhancement facility */ 194 ,/* rdp enhancement facility */ 196, /* processor activity instrumentation facility */
Signature · 1 line
2.47.0
Janosch Frank
maintainer[GIT PULL 14/14] KVM: s390: selftests: Add regression tests for PFCR subfunctions
In reply to Janosch FrankFrom: Hendrik Brueckner <[email protected]>
Check if the PFCR query reported in userspace coincides with the kernel reported function list. Right now we don't mask the functions in the kernel so they have to be the same.
Message-ID: <[email protected]>
--- tools/arch/s390/include/uapi/asm/kvm.h | 3 ++- .../selftests/kvm/s390x/cpumodel_subfuncs_test.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-)
tools/arch/s390/include/uapi/asm/kvm.h +2 -1
@@ -469,7 +469,8 @@ struct kvm_s390_vm_cpu_subfunc {__u8 kdsa[16 ];/* with MSA9 */ __u8 sortl[32 ];/* with STFLE.150 */ __u8 dfltcc[32 ];/* with STFLE.151 */ -__u8 reserved[1728 ]; +__u8 pfcr[16 ];/* with STFLE.201 */ +__u8 reserved[1712 ]; };#define KVM_S390_VM_CPU_PROCESSOR_UV_FEAT_GUEST 6
tools/testing/selftests/kvm/s390x/cpumodel_subfuncs_test.c +15 -0
@@ -214,6 +214,19 @@ static void test_dfltcc_asm_block(u8 (*query)[32]) : "cc", "0", "1"); } +/* +* Testing Perform Function with Concurrent Results (PFCR) +* CPU subfunctions's ASM block +*/ +static void test_pfcr_asm_block (u8 (*query)[16 ]) +{ + asmvolatile (" lghi 0,0\n" +" .insn rsy,0xeb0000000016,0,0,%[query]\n" + : [query]"=QS" (*query) + : + :"cc" ,"0" ); +} +typedef void (*testfunc_t )(u8 (*array)[]);struct testdef {
@@ -249,6 +262,8 @@ struct testdef { { "SORTL", cpu_subfunc.sortl, sizeof(cpu_subfunc.sortl), test_sortl_asm_block, 150 },/* DFLTCC - Facility bit 151 */ { "DFLTCC", cpu_subfunc.dfltcc, sizeof(cpu_subfunc.dfltcc), test_dfltcc_asm_block, 151 }, +/* Concurrent-function facility - Facility bit 201 */ + { "PFCR", cpu_subfunc.pfcr, sizeof(cpu_subfunc.pfcr), test_pfcr_asm_block, 201 }, };int main (int argc,char *argv[])
Signature · 1 line
2.47.0
Paolo Bonzini
maintainerQuoted 22 lines · Janosch Frank
Paolo,
here's the second and final tranche of ucontrol tests together with cpumodel sanity tests and the gen 17 cpumodel changes.
Heiko and I decided to move the uvdevice patches through the s390 kernel tree since a set of crypto changes depend on them and we didn't feel like creating a topic branch.
Please pull.
The following changes since commit
8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b:Linux 6.12-rc2 (2024-10-06 15:32:27 -0700)are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-next-6.13-1for you to fetch changes up to
7a1f3143377adb655a3912b8dea714949f819fa3:
Quoted 7 lines
KVM: s390: selftests: Add regression tests for PFCR subfunctions (2024-11-11 12:15:44 +0000)
----------------------------------------------------------------
- second part of the ucontrol selftest
- cpumodel sanity check selftest
- gen17 cpumodel changes
----------------------------------------------------------------
Pulled, thanks!
Paolo
Quoted 43 lines
Christoph Schlameuss (5):
KVM: s390: selftests: Adduc_map_unmapVM test case
KVM: s390: selftests: Adduc_skeyVM test case
KVM: s390: selftests: Verify reject memory region operations for
ucontrol VMs
KVM: s390: selftests: Fix whitespace confusion in ucontrol test
KVM: s390: selftests: correct IP.b length inuc_handle_sieicdebug
outputHariharan Mari (5):
KVM: s390: selftests: Add regression tests for SORTL and DFLTCC CPU
subfunctions
KVM: s390: selftests: Add regression tests for PRNO, KDSA and KMA
crypto subfunctions
KVM: s390: selftests: Add regression tests for KMCTR, KMF, KMO and PCC
crypto subfunctions
KVM: s390: selftests: Add regression tests for KMAC, KMC, KM, KIMD and
KLMD crypto subfunctions
KVM: s390: selftests: Add regression tests for PLO subfunctionsHendrik Brueckner (4):
KVM: s390: add concurrent-function facility to cpu model
KVM: s390: add msa11 to cpu model
KVM: s390: add gen17 facilities to CPU model
KVM: s390: selftests: Add regression tests for PFCR subfunctionsarch/s390/include/asm/kvm_host.h | 1 + arch/s390/include/uapi/asm/kvm.h | 3 +- arch/s390/kvm/kvm-s390.c | 43 ++- arch/s390/kvm/vsie.c | 3 +- arch/s390/tools/gen_facilities.c | 2 + tools/arch/s390/include/uapi/asm/kvm.h | 3 +- tools/testing/selftests/kvm/Makefile | 2 + .../selftests/kvm/include/s390x/facility.h | 50 +++ .../selftests/kvm/include/s390x/processor.h | 6 + .../selftests/kvm/lib/s390x/facility.c | 14 + .../kvm/s390x/cpumodel_subfuncs_test.c | 301 ++++++++++++++++ .../selftests/kvm/s390x/ucontrol_test.c | 322 +++++++++++++++++- 12 files changed, 737 insertions(+), 13 deletions(-)create mode 100644
tools/testing/selftests/kvm/include/s390x/facility.hcreate mode 100644tools/testing/selftests/kvm/lib/s390x/facility.ccreate mode 100644tools/testing/selftests/kvm/s390x/cpumodel_subfuncs_test.c