Skip to contentSkip to conversation

KVM: s390: refactor crypto initialization

GIT PULL Christian Borntraeger 1 participant 1 message Oct 2, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

From: Tony Krowiak <[email protected]>

This patch refactors the code that initializes and sets up the crypto configuration for a guest. The following changes are implemented via this patch:

1. Introduces a flag indicating AP instructions executed on the guest shall be interpreted by the firmware. This flag is used to set a bit in the guest's state description indicating AP instructions are to be interpreted.

2. Replace code implementing AP interfaces with code supplied by the AP bus to query the AP configuration.

Message-Id: <[email protected]>

---
 arch/s390/include/asm/kvm_host.h |  3 ++
 arch/s390/kvm/kvm-s390.c         | 70 +++++++++++++++-----------------
 2 files changed, 36 insertions(+), 37 deletions(-)
arch/s390/include/asm/kvm_host.h +3 -0
index 75d39628f21d..79fa0a3a777f 100644
@@ -187,6 +187,7 @@ struct kvm_s390_sie_block {
 #define ECA_AIV		0x00200000
 #define ECA_VX		0x00020000
 #define ECA_PROTEXCI	0x00002000
+#define ECA_APIE	0x00000008
 #define ECA_SII		0x00000001
 	__u32	eca;			/* 0x004c */
 #define ICPT_INST	0x04
@@ -256,6 +257,7 @@ struct kvm_s390_sie_block {
 	__u8	reservede4[4];		/* 0x00e4 */
 	__u64	tecmc;			/* 0x00e8 */
 	__u8	reservedf0[12];		/* 0x00f0 */
+#define CRYCB_FORMAT_MASK 0x00000003
 #define CRYCB_FORMAT1 0x00000001
 #define CRYCB_FORMAT2 0x00000003
 	__u32	crycbd;			/* 0x00fc */
@@ -716,6 +718,7 @@ struct kvm_s390_crypto {
 	__u32 crycbd;
 	__u8 aes_kw;
 	__u8 dea_kw;
+	__u8 apie;
 };
 
 #define APCB0_MASK_SIZE 1
arch/s390/kvm/kvm-s390.c +33 -37

117 lines not on this page · raw message

Signature · 1 line
2.17.0