KVM: s390: selftests: Add uc_skey VM test case

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.

Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Link: https://lore.kernel.org/r/20241108091620.289406-1-schlameuss@linux.ibm.com
Acked-by: Janosch Frank <frankja@linux.ibm.com>
[frankja@linux.ibm.com: Fixed patch prefix]
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Message-ID: <20241108091620.289406-1-schlameuss@linux.ibm.com>
This commit is contained in:
Christoph Schlameuss
2024-11-08 10:16:20 +01:00
committed by Janosch Frank
parent ae16b0ab3b
commit 0185fbc6a2
2 changed files with 149 additions and 2 deletions

View File

@@ -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