]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
KVM: s390: SIE considerations for AP Queue virtualization
authorTony Krowiak <akrowiak@linux.vnet.ibm.com>
Fri, 13 Oct 2017 17:38:46 +0000 (13:38 -0400)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 9 Nov 2017 08:49:45 +0000 (09:49 +0100)
The Crypto Control Block (CRYCB) is referenced by the SIE state
description and controls KVM guest access to the Adjunct
Processor (AP) adapters, usage domains and control domains.
This patch defines the AP control blocks to be used for
controlling guest access to the AP adapters and domains.

Signed-off-by: Tony Krowiak <akrowiak@linux.vnet.ibm.com>
Message-Id: <1507916344-3896-2-git-send-email-akrowiak@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/kvm_host.h

index fd006a272024a3fefd10ef2217c1b49c15adef82..f3a9b5a445b64382c1020099b6dbcec5d9f30ede 100644 (file)
@@ -685,11 +685,28 @@ struct kvm_s390_crypto {
        __u8 dea_kw;
 };
 
+#define APCB0_MASK_SIZE 1
+struct kvm_s390_apcb0 {
+       __u64 apm[APCB0_MASK_SIZE];             /* 0x0000 */
+       __u64 aqm[APCB0_MASK_SIZE];             /* 0x0008 */
+       __u64 adm[APCB0_MASK_SIZE];             /* 0x0010 */
+       __u64 reserved18;                       /* 0x0018 */
+};
+
+#define APCB1_MASK_SIZE 4
+struct kvm_s390_apcb1 {
+       __u64 apm[APCB1_MASK_SIZE];             /* 0x0000 */
+       __u64 aqm[APCB1_MASK_SIZE];             /* 0x0020 */
+       __u64 adm[APCB1_MASK_SIZE];             /* 0x0040 */
+       __u64 reserved60[4];                    /* 0x0060 */
+};
+
 struct kvm_s390_crypto_cb {
-       __u8    reserved00[72];                 /* 0x0000 */
-       __u8    dea_wrapping_key_mask[24];      /* 0x0048 */
-       __u8    aes_wrapping_key_mask[32];      /* 0x0060 */
-       __u8    reserved80[128];                /* 0x0080 */
+       struct kvm_s390_apcb0 apcb0;            /* 0x0000 */
+       __u8   reserved20[0x0048 - 0x0020];     /* 0x0020 */
+       __u8   dea_wrapping_key_mask[24];       /* 0x0048 */
+       __u8   aes_wrapping_key_mask[32];       /* 0x0060 */
+       struct kvm_s390_apcb1 apcb1;            /* 0x0080 */
 };
 
 /*